Select to view content in your preferred language

Using AreaGeodetic() in label expression

1998
3
Jump to solution
11-01-2023 03:18 AM
JLezik
by
Occasional Contributor

Hi,

I have a polygon feature class in crs WGS 1984. Using Expression Builder (Arcade), it is possible to configure pop-up to display area of each feature in square meters:

Round(AreaGeodetic($feature,'square-meters'))

It works fine. But when I tried to set up labels in the same way, I got error message "Invalid expression. Error on line 1. Projection is invalid" .

Am I doing something wrong or it's not possible to display geodetic area in labels at all? It would be much more straightforward to display that information in label instead of pop-up.

I have to keep the feature class in WGS 1984, project into another crs is not an option for me in this case. I also don't want to use field calculator, because I would like to get that information dynamically after editing of each feature.

 

Thanks,

Jakub

0 Kudos
1 Solution

Accepted Solutions
JesseWickizer
Esri Contributor

The AreaGeodetic function will work in a label expression when the map uses either Web Mercator (wkid 3857) or WGS 84 (wkid 4326) spatial reference.

View solution in original post

0 Kudos
3 Replies
JesseWickizer
Esri Contributor

The AreaGeodetic function will work in a label expression when the map uses either Web Mercator (wkid 3857) or WGS 84 (wkid 4326) spatial reference.

0 Kudos
JLezik
by
Occasional Contributor

Thanks for the explanation...but anyway it would be great if it worked also in other (at least WGS-based) coordinate systems. From this point of view, I don't see any difference between Web Mercator and for example Universal Transverse Mercator.

0 Kudos
JesseWickizer
Esri Contributor

As of Arcade version 1.3.0 the AreaGeodetic, BufferGeodetic, DistanceGeodetic, and LengthGeodetic functions are no longer limited to Web Mercator and WGS 84. Arcade version 1.3.0 is used by ArcGIS Pro version 3.5 and ArcGIS Enterprise version 11.5.

0 Kudos