## Polyline Characteristics

Running programmatically

Calculates some characteristics of the polylines from a polyline dataset

### Inputs:

• A Polyline layer

### Outputs:

• A new Polyline dataset
• All original attributes are preserved.
• New fields added to the attribute table
• ET_Sinous - the sinuosity of the polyline calculated as ratio of the length of the polyline and the length of the line connecting the start and end points of the polyline. The value ranges from 1 (case of straight line) to infinity (case of a closed polyline). In case of infinity a 0 is recorded in the attribute table. See illustration below.
• ET_Vert - the number of vertices of the polyline
• ET_Dir - the general direction of the polyline - the direction in decimal degrees measured in North Azimuth of the line connecting the start and end points of the polyline (see illustration below).
• ET_Parts - the number of parts that the polyline has
• ET_HasArcs - if the polyline has true arc segments - 1 otherwise - 0
• ET_Closed - - if the polyline is closed - 1 otherwise - 0
• ET_Fract - the fractal dimension (indication of the complexity) of the polyline. The value is between 1 and 2. The more complex the polylineis the larger the fractal dimension will be.

### Notes:

• Fractal Dimension of the polylines is calculated using the Box Counting method (1)

• Calculating the Fractal Dimension is time consuming. If you don't need this characteristic, uncheck the option 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 PolylineCharacteristics
<input dataset> A String representing the input layer. Must be of Polyline type.
<output dataset> A String - the full name of the output layer.
{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, "PolylineCharacteristics", "input dataset", "output dataset", "Calculate Fractal", "Precision"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "PolylineCharacteristics" "input dataset" "output dataset" "Calculate Fractal" "Precision"
.NET using ETGWOutX.dll PolylineCharacteristics(input dataset, output dataset, Calculate Fractal, Precision)
ArcPy arcpy.PolylineCharacteristics(input dataset, output dataset, "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)