Open Table of Contents

ET GeoWizards Scripting

CreateCenterlines
(Go to the main page of the function)

Creates centerlines from polygon features.

Syntax    

Dim ET As  New ETGW_Core
Set variable = ET.CreateCenterlines(pInFeatureClass, sOutFileName, dMaxWidth, dMinWidth, sType, bSmooth,  sMessage)

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

Part Description
variable An IFeatureClass object
pInFeatureClass Required. An IFeatureClass object (Must be a Polygon 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)
dMaxWidth Required. A Double representing  the aggregation distance. The polygons that are closer to each other than this distance will be combined
dMinWidth Required. A Double representing  the minimum area of holes to be preserved. All holes with area less than this tolerance will be removed.
sType Required. A String indicating the type of centerlines to be created. Case sensitive.
  • Inside - the centerlines will be created inside the polygons - suitable for deriving centerlines from rivers and streets represented by polygons
  • Outside - the centerlines will be created in the gaps between polygons - suitable for deriving street centerlines from cadastral data.
bSmooth Required. A Boolean indicating whether the resulting centerlines will be smoothed. B-Spline smoothing algorithm is used 
sMessage Optional. In a case of failure -  description of the cause. If the functions completes with success an empty string will be returned. 

Example