[GIS] Why is “calculate geometry” grayed out when data frame properties shows map units are in meters not degrees

arcgis-10.0arcgis-desktop

I'm using ArcMap 10.0 and am trying to get the length of a polyline by adding a field to the attributes table and calculating geometry, but that option is grayed out. Someone suggested that it's because my map was in degrees but according to the properties for the data frame, both display and map units are in meters, which means I should be able to get the lengths of these lines, right?

Best Answer

Your data is probably not projected. This means that inside the shapefile, the vertices of your polyline are stored as decimal degrees. Usually, you would have to use the Project tool to project the dataset into a planar spatial reference system that allows for geometric calculations in non-angular units. However, when calculating line length (but not area), ArcGIS can calculate the geodesic distance, which should result in an even more accurate result.

So instead of using the "Calculate geometry" tool, use Field calculator, select the "Python" parser, and enter the following expression:

!shape.length@meters!