Calculating Geometry Attributes of Vector Features
Included in this tutorial:
Option 1: Using the Calculate Geometry tool through the Attribute Table
Option 2: Using the Calculate Geometry Attributes tool from the Geoprocessing pane
Example 1: Calculating the area of polygon features
Example 2: Calculating the coordinates of point features
Software version in examples: ArcGIS Pro 2.9.1 and 3.0.2
Tutorial Data: The tutorial includes demonstration with sample data available here.
Credits: L. Meisterlin (2022)
This tutorial demonstrates calculating geometry attributes of vector features in ArcGIS Pro, from the Attribute Table and via the Calculate Geometry Attributes tool in the Geoprocessing pane.
Option 1: From the Attribute Table
To calculate geometry attributes within an existing field of an attribute table, right-click on the field header in the attribute table and click “Calculate Geometry.”
choosing Calculate Geometry after right-clicking a field header in the attribute table
the Calculate Geometry tool dialogue box
This will summon the Calculate Geometry dialogue box. The Input Features and Geometry Attributes Field parameters will be pre-populated, reflecting the field and the layer from which you accessed the tool.
The other options include:
Property: Specify the geometric property to be calculated within the field.
In this example, we demonstrate calculating area. Other options (depending on the Input Features’ geometry type) can include perimeter, x- and y- coordinates of a centroid location, and others.
Unit: Depending on the Property (or properties) chosen above, a unit drop-down will appear for you to specify the units of your calculation.
In the example above, the available units to calculate area are shown because the Area property was specified.
Coordinate System: Specify the coordinate system for the calculation, either from the CRS options within the current map project (listed in the drop-down menu) or another CRS by clicking the graticule-globe icon to the right of the drop-down menu.
A note about the Coordinate Systems options: If no coordinate system is specified, the software will use the CRS of the underlying dataset as default. If the input features are not projected, the geometric property options will be limited until you specify a projected CRS for the calculations.
To execute the tool, click OK.
The resulting calculations will be visible in the layer’s attribute table.
results of the example calculation in the Area_SqMi field
Option 2: the Calculate Geometry Attributes tool
To calculate geometric attributes of vector features (area of a polygon or x- and y-coordinates of points, for example), use the Calculate Geometry Attributes tool in ArcGIS Pro. This tool offers different geometry calculation options depending on the type of vector layer. For example, you can calculate the length of a line features, the perimeter of polygon features, and neither for points.
Access the tool in the Geoprocessing panel by searching or by clicking through Toolboxes > Data Management Tools > Features > Calculate Geometry Attributes.
Because these calculations require linear measurement, notice that calculating attributes based on the vector geometry will require specifying both
the units of the calculation (e.g., feet, meters, miles, etc.)
the CRS with which to perform the calculation.
A note about the Coordinate Systems options: If no coordinate system is specified, the software will use the CRS of the underlying dataset as default. If the input features are not projected, the geometric property options will be limited until you specify a projected CRS for the calculations.
the Coordinate System options
Example 1: Calculating the Area of Polygon Features
The demonstration below shows calculating the area of the polygon features (in the “Census Tracts” layer) in square miles using the CRS of the map view—and creating a new field in the layer’s attribute table (called “Area_SqMiles”) to store the values. In this case, the CRS of the map is the NY Long Island State Plane based on the NAD83 datum.
In the demonstration, notice
Where we specified a new field (and named it “Area_SqMiles”), you can also choose an existing field in the attribute table to store the new geometry values.
The list of geometric properties you can calculate for polygons is accessed under Property (next to the relevant field name). Here, we choose “area.”
You can choose to calculate multiple geometry attributes at once by adding additional fields and specifying which Property to calculate.
The units drop-down appears once a geometric property option is chosen.
The drop-down list of coordinate systems includes the CRS of the Map as well as the CRS of the layers within the project. To choose a different CRS, click the 🌐 icon to the right of the Coordinate System options.
The new field with the area calculated in square miles is appended to the end (right) of the layer’s attribute table.
calculating the area of polygon features
Example 2: Calculate the Coordinates of Point Features
The demonstration below uses the same tool to calculate the X- and Y-coordinates of point features (in the “Points1_Table1_join” layer). The tutorial data used for this demonstration already has two pairs of fields with coordinates (one set calculated in feet and the other in decimal degrees). In this tutorial, we will again calculate the coordinates in decimal degrees using the WGS1984 datum (unprojected).
Most of the steps of the demonstration are similar to those listed in the example above. New or different elements in this demonstration include…
Choosing point features as the input layer changes the geometry property options.
We demonstrate choosing a CRS that is neither the CRS of the current map view nor the CRS of any layers within the map project.
We access the Coordinate System dialogue box (where you can browse or search for a CRS).
Expand the browsing lists for “Favorite” CRS choices, Geographic Coordinate Systems (i.e., unprojected datums), and Projected Coordinate Systems (i.e., projected datums).
Search for the WGS 1984 CRS in the dialogue box’s search bar and examine the search results. (Searching filters the options in the browsable lists.)
Hover over the “Add to Favorites” option which allows you to access certain CRS choices faster in the future within the “Favorites” list, before choosing the WGS 1984 CRS.
Again, the new fields will be appended to the right of the layer’s attribute table.
calculating two new fields with the X- and Y-coordinates of point features, in WGS 1984 decimal degrees