Summary
In some instances, it is necessary to find the number of vertices for each feature in a line or polygon feature class to perform further spatial analysis. This article provides the workflow for the counting of vertices of line or polygon features in ArcGIS Pro.
Procedure
- Start the ArcGIS Pro project.
- In the Contents pane, browse to and right-click the layer, and click Attribute Table.
- In the layer’s attribute table, click Add to add a new field in the table.
- In the Fields view, name the new field as VxCount and ensure Data Type is set to Long.
- On the top ribbon, on the Fields tab, in the Changes group, click Save to save the edits made.
- In the attribute table, right-click the header of the VxCount field, and select Calculate Field.
- In the Calculate Field window, ensure the following parameters are specified as follows:
- Input Table: The desired layer. In this example, the layer titled BuildingDamage is selected.
- Field Name (Existing or New): VxCount.
- Expression Type: Python 3.
- VxCount =: !shape!.pointcount
- Leave other parameters as default.
- Click OK to run the tool.
The image below shows the number of vertices for the layer titled BuildingDamage displayed in the VxCount field in the attribute table.