Open Table of Contents

Random Points In Polygons

Go to ToolBox Implementation Go to .NET Implementation

Generates random points located in the polygons of the input polygon dataset. The number of points per polygon can be constant or different for each polygon - based on the values in a numeric field of the input polygon feature class.

Inputs:

Outputs:

Notes:

Illustration:

Original polygons labeled with the values in field to be used as a source for getting the number of points to be generated and the resulting points.
Distance between points = 0, Minimum distance to boundary = 0

30 points per polygon.
Distance between points = 0, Minimum distance to boundary = 0
r30_0_0
30 points per polygon.
Distance between points = 0, Minimum distance to boundary = 5
r30_0_5
30 points per polygon.
Distance between points = 5, Minimum distance to boundary = 0
r30_5_0
30 points per polygon.
Distance between points = 5, Minimum distance to boundary = 5
r30_5_5

ToolBox implementation
(Go to TOP)

Command line syntax

ET_GPRandomPointsInPolygons<input_dataset>  <out_feature_class> {number_points_field} {number_points} {min_distance_between_points} {min_distance}

Parameters

Expression Explanation
<input_dataset> A Polygon feature class or feature layer
<out_feature_class> A String - the full name of the output feature class.
{number_points_field} A String representing the name of a numeric field which values will be used to get the number of points to be generated per polygon.
{number_points} Optional. A number that is used in two ways
  • If a number_points_field is specified,  number_points is used as maximum points allowed per polygon
  • If a number_points_field is an empty string, number_points is used as a constant that define the number of  points to be generated per polygon
{min_distance_between_points} A Double specifying the minimum distance between the points.
{min_distance} A Double specifying the minimum distance from boundary.

Note: One of number_points_field or number_points should be specified.

Scripting syntax

ET_GPRandomPointsInPolygons(input_dataset,  out_feature_class, number_points_field, number_points, min_distance_between_points, min_distance)

See the explanations above:
<> - required parameter
{} - optional parameter

.NET implementation
(Go to TOP)

RandomPointsInPolygons(pInFC As IFeatureClass, sOutFName As String, Optional iNumberPoints As Integer = 0, Optional sNumberPointsField As String = "", Optional dMinDistanceBetween As Double = 0, Optional dMinDistanceToBoundary As Double = 0) As IFeatureClass

Copyright Ianko Tchoukanski