TransWikia.com

How to calculate area of polygon using ArcGIS system tools?

Geographic Information Systems Asked on February 20, 2021

I like "Add Geometry Attributes" tool, it has some great options, e.g. centroid inside. Documentation states that:

This tool presents an easy and efficient way to automate the task that
can also be accomplished using the Calculate Geometry dialog box
or the Calculate Field geoprocessing tool.

Great news, unfortunately I cannot figure out how to calculate polygon area or length of a line.

When I start tool I can see them:

enter image description here

In documentation the description for selected couple says "AREA – POLY_AREA: The area of the polygon" and "LENGTH: The length of the line."

However, when I provide input as projected feature class containing polygons, these options disappear and I see only geodesic:

enter image description here

I know how to do it in script, field calculator but I’d like to use system tools because they are fast.

How do I calculate area of polygon using ArcGIS system tools?

One Answer

In all the time I have used this tool I have never noticed that it offers up different properties to calculate based upon the coordinate system of the dataset!

I wonder if it is to do with your dataset? I have some polygons in British National Grid and I get offered up both options as shown below:

A dataset using a projected coordinate system (British National Grid)

Example 1

But if I use a polygon dataset that is in WGS84 I see only one of the options:

A dataset using WGS84

Example 2

My version of ArcMap is 10.6

UPDATE: Reviewing the sample you linked to I was able to replicate the issue and I tracked down why it was dropping the AREA option. The issue is to do with the validation code of the script specifically a line in the updateParameters function:

gcsOrMercator = False if not sr.GCSName and sr.PCSName.upper().find("MERCATOR") == -1 else True

Your dataset has no GCS name but contains the word "mercator" in its projected name, so the variable gcsOrMercator ends being True. Later on in the validation code it strips out the options AREA and PERIMETER_LENGTH from the available list of options based upon that variable. I don't know if this is an oversight in the ESRI code or if it is an issue of creating area for mercator projections. As I understand it mercator gets less accurate at the extreme limits of the coordinate system. If it is do with that then my initial guess was correct, its the dataset and you would need to project it into a local coordinate system, at that point you are on your own, I don't know what is best for New Zealand, although I do know its a great country to visit!

:)

Correct answer by Hornbydd on February 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP