Uniform Points In Polygons

Running programmatically

Generates uniform (regularly spaced) 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. The distance between the points is interpolated for each polygon. The user can specify the rotation angle for the resulting point grid.

Inputs:

Outputs:

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.Rotational angle = 0, Minimum distance to boundary = 5

uni1

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.
Rotational angle = "Along the longest Axis", Minimum distance to boundary = 5

uni2

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. Rotational angle = "Along the longest side", Minimum distance to boundary = 5

uni3

50 points per polygon. Rotational angle = "Along the longest side", Minimum distance to boundary = 0

uni4

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name UniformPointsInPolygons
<input dataset> A String representing the input layer. Must be of Polygon type.
<output dataset> A String - the full name of the output layer.
<Angle From> Required. A String -This parameter defines what will be the source rotation of the grids:
  • "Constant" - user defined value for all grids.
  • "FromField" - different for each grid based on a value in the attribute table.
  • "LongestAxis" - the grids will be oriented along the longest axis of each polygon.
  • "LongestSide" - the grids will be oriented along the longest side of each polygon.
{Number Points} An Integer representing the number of points per polygon to be created.
{Number Points Field} A String representing the name of a field in the in the attribute table of the input dataset. The field has the values for the number points per polygon to be created.
{Angle} A Double representing the rotation angle of the grids
{Angle Field} A String representing the name of a field in the in the attribute table of the input dataset field name. The field has the values for the angle of the grids to be created.
{Distance to Boundary} A Double representing the minimum distance to the polygon boundary

Running the function

ETGWPath used in the table below is the full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call( [ETGWPath, "UniformPointsInPolygons", "input dataset", "output dataset", "Angle From", "Number Points", "Number Points Field", "Angle", "","Distance to Boundary"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "UniformPointsInPolygons" "input dataset" "output dataset" "Angle From" "Number Points" "Number Points Field" "Angle" "" "Distance to Boundary"
.NET using ETGWOutX.dll UniformPointsInPolygons(input dataset, output dataset, Angle From, Number Points, Number Points Field, Angle, "", Distance to Boundary)
ArcPy arcpy.UniformPointsInPolygons(input dataset, output dataset , "Angle From", "Number Points", "Number Points Field", "Angle", "", "Distance to Boundary")

Notes:

(Go to TOP)