Open Table of Contents

Smooth Polyline

Go to ToolBox Implementation Go to .NET Implementation

Smooth the features of a polyline layer using three different smoothing algorithms

Inputs:

Outputs:

Notes :

Examples:

Smooth results: Dashed - Original; Red - Bezier; Green - B-Spline; Blue- T-Spline (Default parameters)

smooth1.jpg (23756 bytes)

Bezier smooth-bezier.jpg (12123 bytes)
B-Spline
  • Green - Freedom = 3
  • Blue - Freedom = 5
smooth-b.jpg (14957 bytes)
T-Spline
  • Green - Tension = 30
  • Blue - Tension = 90
smooth-t.jpg (15435 bytes)

ToolBox implementation
(Go to TOP)

Command line syntax - ET_GPSmoothBezier

ET_GPSmoothBezier <input_dataset> <out_feature class> <smoothness>

Parameters

Expression Explanation
<input_dataset> A Polyline feature class or feature layer
<out_feature class> A String - the full name of the output feature class (A feature class with the same full name should not exist)
<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 polyline multiplied by this value will give the number of vertices of the smoothed polyline. The larger the value of the <smoothness> parameter, the slower the process will be.

Scripting syntax - ET_GPSmoothBezier

ET_GPSmoothBezier (input_dataset, out_feature class, smoothness)

Command line syntax - ET_GPSmoothBSpline

ET_GPSmoothBSpline <input_dataset> <out_feature class> <smoothness> <freedom>

Parameters

Expression Explanation
<input_dataset> A Polyline feature class or feature layer
<out_feature class> A String - the full name of the output feature class (A feature class with the same full name should not exist)
<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 polyline multiplied by this value will give the number of vertices of the smoothed polyline. The larger the value of the <smoothness> parameter, the slower the process will be.
<freedom> An Integer that defines how close to the original polyline 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

Scripting syntax - ET_GPSmoothBSpline

ET_GPSmoothBSpline (input_dataset, out_feature class, smoothness, freedom)

Command line syntax - ET_GPSmoothBSpline

ET_GPSmoothTSpline <input_dataset> <out_feature class> <smoothness> <tension>

Parameters

Expression Explanation
<input_dataset> A Polyline feature class or feature layer
<out_feature class> A String - the full name of the output feature class (A feature class with the same full name should not exist)
<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 polyline multiplied by this value will give the number of vertices of the smoothed polyline. The larger the value of the <smoothness> parameter, the slower the process will be.
<tension> An Integer that defines how close to the original polyline the curve will be. Increasing the tension is similar to pulling on the ends of a string constrained to pass through the polyline vertices. allowed values are from 1 to 100.

Scripting syntax - ET_GPSmoothBSpline

ET_GPSmoothTSpline (input_dataset, out_feature class, smoothness, tension)

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

.NET implementation
(Go to TOP)

SmoothBSpline(pInFC As IFeatureClass, sOutFName As String, iSmoothness As Short, iFreedom As Short, sPolylinesType As String) As IFeatureClass

SmoothTSpline(pInFC As IFeatureClass, sOutFName As String,iSmoothness As Short, iFreedom As Short, sPolylinesType As String) As IFeatureClass

SmoothBezier(pInFC As IFeatureClass, sOutFName As String, iSmoothness As Short, sPolylinesType As String) As IFeatureClass

Copyright Ianko Tchoukanski