3

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?

0

1 Answer 1

2

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!

:)

5
  • Puzzle! Unlucky NZ because I work 99.9% of the time in NZGD_2000_New_Zealand_Transverse_Mercator.
    – FelixIP
    Commented Aug 23, 2020 at 1:03
  • Is there some sample data you can point me to, see if I can replicate the issue? It may be a bug?
    – Hornbydd
    Commented Aug 23, 2020 at 1:50
  • Here you go drive.google.com/file/d/1rIWA3C7CY_Dqz6MhJCHJ6I06GOLTMhO2/…
    – FelixIP
    Commented Aug 23, 2020 at 2:02
  • @FelixIP please see update in my answer
    – Hornbydd
    Commented Aug 24, 2020 at 16:34
  • 2
    Nice forensic work! It works with local circuit.
    – FelixIP
    Commented Aug 24, 2020 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.