Open Table of Contents

ET GeoWizards Scripting

Polygon To Point
(Go to the main page of the function)

Converts a polygon data set to a point feature class.

Syntax    

Dim ET As  New ETGW_Core
Set variable = ET.PolygonToPoint(pInFeatureClass, sOutFileName, sExportOption, bRemoveDuplicates)

The PolygonToPoint 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)
sExportOption Required. A String -  the export option to be used. The available options are (Case sensitive): 
  • "Vertex" -  - the vertices of all polygons will be converted to points. If bRemoveDuplicates = True  the duplicate points created from the vertices of two adjacent polygons will be represented by one point.
  • "Label" - the Label point is always located inside the polygon.  The algorithm makes sure that the point is not close to the boundary of the polygon. Points created using this algorithm are suitable for spatial transfer of attributes (See Smooth Polygons and Generalize Polygons functions).
  • "Center" - the Center points represent the centroid of a polygon. Therefore sometimes they might be located outside of the polygon
  • "CenterIn" - points representing the centroids of the polygons. If the centroid occurs outside of the polygon, the point is moved to be in the polygon.
bRemoveDuplicates Required. A Boolean  used only with sExportOption = "Vertex". If True the duplicate points representing coincident vertices of two or more adjacent polygons will be removed.

Example