Smooth Polygons

Running programmatically

Smooth the features of a polygon layer using three different smoothing algorithms. The polygons are cleaned from overlaps before proceeding with smoothing.

Inputs:

Outputs:

Notes :

Examples:

B-Spline - default values for smoothness and freedom

B-Spline - default values for smoothness and freedom. Densified before smoothing

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name SmoothPolygonsBezier
Function Name SmoothPolygonsBSpline
Function Name SmoothPolygonsTSpline
<input dataset> A String representing the input layer. Must be of polygon type.
<output dataset> A String - the full name of the output layer.
<Smoothness> An Integer that defines the number of points in the output curve. The allowed values ( 2 to 20 ) in fact are point multiplier. The number of vertices of the original polygon multiplied by this value will give the number of vertices of the smoothed polygon. The larger the value of the parameter, the slower the process will be.
<Freedom> Only for B-Spline. An Integer that defines how close to the original polygon the curve will be. The allowed values are from 3 to 10. Smaller values give better approximation. With large values the curve will become very similar to Bezier curve
<Tension> Only for T-Spline. An Integer that defines how close to the original polygon the curve will be. Increasing the tension is similar to pulling on the ends of a string constrained to pass through the polygon vertices. allowed values are from 1 to 100.
{Densify Before} A Double representing the Densification tolerance. In some cases the smooth parameters cannot restrict the smoothing enough. The user can restrict the effect of the smoothing by introducing new vertices in the shapes. See Densify function for details
{Generalize After} A Double representing the Generalization tolerance. The smoothing introduces in the shapes many new vertices. The user can decrease the number of vertices by using this option. See Generalize function for details.

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")

SmoothPolygonsBezier

Language Syntax
Python subprocess.call([ETGWPath, "SmoothPolygonsBezier", "input dataset", "output dataset", "Smoothness", "Densify Before", "Generalize After"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "SmoothPolygonsBezier" "input dataset" "output dataset" "Smoothness" "Densify Before" "Generalize After"
.NET using ETGWOutX.dll SmoothPolygonsBezier(input dataset, output dataset, Smoothness, Densify Before, Generalize After)
ArcPy arcpy.SmoothPolygonsBezier(input dataset, output dataset, "Smoothness" , "Densify Before", "Generalize After")

SmoothPolygonsBSpline

Language Syntax
Python subprocess.call([ETGWPath, "SmoothPolygonsBSpline", "input dataset", "output dataset", "Smoothness", "Freedom", "Densify Before", "Generalize After"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "SmoothPolygonsBSpline" "input dataset" "output dataset" "Smoothness" "Freedom" "Densify Before" "Generalize After"
.NET using ETGWOutX.dll SmoothPolygonsBSpline(input dataset, output dataset, Smoothness, Freedom, Densify Before, Generalize After)
ArcPy arcpy.SmoothPolygonsBSpline(input dataset, output dataset, "Smoothness" , "Freedom", "Densify Before", "Generalize After")

SmoothPolygonsTSpline

Language Syntax
Python subprocess.call([ETGWPath, "SmoothPolygonsTSpline", "input dataset", "output dataset", "Smoothness", "Tension", "Densify Before", "Generalize After"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "SmoothPolygonsTSpline" "input dataset" "output dataset" "Smoothness" "Tension" "Densify Before" "Generalize After"
.NET using ETGWOutX.dll SmoothPolygonsTSpline(input dataset, output dataset, Smoothness, Tension, Densify Before, Generalize After)
ArcPy arcpy.SmoothPolygonsTSpline(input dataset, output dataset, "Smoothness" , "Tension", "Densify Before", "Generalize After")

Notes:

(Go to TOP)