## Polygon Characteristics

Running programmatically

Calculates some characteristics of the polygons from a polygon dataset

### Inputs:

• A Polygon feature class

### Outputs:

• A new Polygon dataset
• All original attributes are preserved.
• New fields added to the attribute table
• ET_Length - the length of the longest axis in the units of the Spatial Reference of the input feature class.
• ET Width - the length of shortest side of the bounding rectangle aligned with the longest axis in the units of the Spatial Reference of the input feature class.
• ET Circ - Circularity ratio - for a circle the circularity will be 1. The thinner the polygon is the smaller the circularity will be.
• ET Thick - Thickness ratio expressed as a ratio of the polygon area versus the area of its minimum bounding square. The ratio will have value of 1 for a square. The smaller the value is, the thinner the polygon is.
• ET_Parts - the number of parts that the polygon has
• ET_Holes - the number of holes in the polygon
• ET_HasArcs - if the polygon has true arc segments - 1 otherwise - 0
• ET_Vert - the number of vertices of the polygon
• ET_Depth - the distance from the deepest point (the center of the maximum inscribed circle) to the polygon boundary. See Polygon To Maximum Inscribed Circle function
• ET_Fract - the fractal dimension (indication of the complexity) of the polygon boundary. The value is between 1 and 2. The more complex the polygon boundary is the larger the fractal dimension will be.

### Notes:

• Fractal Dimension of the polygon boundaries is calculated using the Box Counting method (1)
• Calculating the Fractal Dimension and Polygon Depth is time consuming. If you don't need these characteristics, uncheck the options for faster processing.

### References:

1. Bourke, P., 1993. Fractal Dimension Calculator User Manual, Online. Available: http://paulbourke.net/fractals/fracdim/

### Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name PolygonCharacteristics
<input dataset> A String representing the input layer. Must be of Polygon type.
<output dataset> A String - the full name of the output layer.
{Calculate Depth} A Boolean indicating whether to calculate polygon depth or not.
{Calculate Fractal} A Boolean indicating whether to calculate fractal dimension or not.
{Precision} An Integer between 0 and 8 representing the number of places after the decimal point to be used.

### 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, "PolygonCharacteristics", "input dataset", "output dataset", "Calculate Depth", "Calculate Fractal", "Precision"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "PolygonCharacteristics" "input dataset" "output dataset" "Calculate Depth" "Calculate Fractal" "Precision"
.NET using ETGWOutX.dll PolygonCharacteristics(input dataset, output dataset, Calculate Depth, Calculate Fractal, Precision)
ArcPy arcpy.PolygonCharacteristics(input dataset, output dataset, "Calculate Depth", "Calculate Fractal", "Precision")

Notes:

• <> - required parameter

• {} - optional parameter

• See examples for Python , .NET or ArcPy

• The argument separator for StartInfo.Arguments is space. If a string might contain a space, you need to double quote it.

(Go to TOP)