Open Table of Contents

ET GeoWizards Scripting

SmoothPolylines2
(Go to the main page of the function)

Smoothes  the features of a polyline layer using three different smoothing algorithms.

Syntax    

Dim ET As  New ETGW_Core
Set variable = ET.SmoothPolylines2(pInFeatureClass, sOutFileName, sSmoothMethod, iPar1, iPar2, dDensify, dGeneralize,  sMessage)

The SmoothPolylines2 method syntax has the following object qualifier and arguments:

Part Description
variable An IFeatureClass object
pInFeatureClass Required. An IFeatureClass object (Must be a Polyline feature class)
sOutFileName Required. A String - the full name of the output feature class (A feature class with the same full name should not exist)
sSmoothMethod Required. A String -  the smooth method  to be used. The available options are (Case sensitive): 
  • "Bezier" 
  • "bSpline" 
  • "tSpline" 

Please read the Smooth Polyline Wizard topic for detailed description of the methods

iPar1 Required. An Integer representing the smoothness of the resulting polylines (used in the three smoothing methods). Allowed values are between 2 and 20
iPar2 Required. An Integer representing:
  • bSpline method - "Freedom" parameter  -  defines how close to the original polyline the curve will be. Allowed values are between 3 to 10.
  • tSpline method - "Tension" parameter - 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 between 1 and 100.
  • Bezier method - this parameter is not used. The input is required but will be ignored - any integer will be accepted.
dDensify Optional A Double representing  the Densification tolerance (Maximum segment length). If missed or 0 - no densification will be performed before smoothing.
dGeneralize Optional A Double representing  the Generalization tolerance (maximum offset) - the maximum distance that the generalized polyline will differ from the original one. If missed or 0 - no generalization will be performed after smoothing.
sMessage Optional. In a case of failure -  description of the cause. If the functions completes with success an empty string will be returned. 

Example