Using AreaGeodetic() in label expression

453
2
Jump to solution
11-01-2023 03:18 AM
Labels (1)
JLezik
by
New Contributor III

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
2 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
New Contributor III

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