Select to view content in your preferred language

# Pro Calculate Geometry vs Arcade Geometry Functions results way off??

1272
8
11-21-2022 01:44 PM
Labels (2)
by
Frequent Contributor

I need help to try and understand why the Arcade Geometry function for, in this example, length in meters is so off?

I created a feature that I knew was about 0.5 mile (~804.6 meters) - I also calculated it out in Google Maps. I have a field in my data where I use the calculate geometry. Calculate geometry in pro comes out to 812.06

but when I use an Arcade expression Length(\$feature, 'meters') to automatically calculate the length... it comes back as 1,104.07!

Can someone please explain to me what is going on? This is happening with all of our line and polygon features. I will probably remove the arcade expression because it is providing our users with completely inaccurate numbers.

1 Solution

Accepted Solutions
MVP Regular Contributor

8 Replies
Frequent Contributor

Geometry functions | ArcGIS Arcade | ArcGIS Developers

Feature geometries in the visualization and labeling profiles are generalized according to the view's scale resolution to improve drawing performance. Therefore, using a feature's geometry (i.e. \$feature) as input to any geometry function in these contexts will return different results at each scale level. Other profiles, such as popup, provide the full resolution geometry.

by
Frequent Contributor

Hi @ClayDonaldsonSWCA - I did read that but the results do not change when the scale is changed. The arcade function is in a popup, not a label and not related to visualization.

MVP Regular Contributor

by
Frequent Contributor

Thank you @AlfredBaldenweck ! That corrected the mis-match.

by
Frequent Contributor

Question for both of you - for some features, negative numbers are being returned? Is there a way to fix that so it shows the correct area / length?

by
MVP Esteemed Contributor

If polygons are showing negative areas, that usually means it was constructed in a clock-wise direction.

Problem: Polygons converted from lines have a negative area

MVP Regular Contributor

Adding this article for more documentation along the same idea. FAQ: Why does the Calculate Geometry tool return negative values? (esri.com)

There doesn't appear to be any documentation about polyline features.

by
Frequent Contributor

Thank you @KenBuja & @AlfredBaldenweck - I appreciate your time and responses!