Select to view content in your preferred language

Using the Geometry($feature) arcade function to calculate Easting (X) and Northing (Y) coordinates

1566
3
11-29-2023 02:59 PM
rhenderson
Emerging Contributor

Any insight on the Geometry($feature) function?

I am trying to populate northing/easting (X/Y coordinates) in my FieldMaps form, using Geometry($feature).x and Geometry($feature).y, but it's not calculating the values correctly. I am in UTM zone 4, and I am getting a negative X value and a close-to-accurate Y value. Is there something I'm missing here?

Thanks in advance. 

3 Replies
LindsayRaabe_FPCWA
MVP Regular Contributor

I'm wanting to do the same thing but can't find anything. Lots of talk on converting to Lat/Long, but nothing about displaying a useful UTM/metres easting northing. I'm trying to get an output in MGA 1994 Zone 50 for use as a label on a point layer. 

Lindsay Raabe
GIS Officer
Forest Products Commission WA
0 Kudos
rhenderson
Emerging Contributor

Hey Lindsay,

I’m no expert here, but I was able to mitigate this issue by changing my base layer of my map. When the base layer was a UTM Zone 4 (where I’m located) spacial reference (of some sort), I was able to get northing and easting to calculate correctly using the calculated expression posted above. 
Unfortunately, once you change your base layer to a UTM map, the arcade code you’ve seen floating around for Lat/Long will likely no longer work. If you’re really good at math you might be able to adjust it to make it work. I couldn’t figure it out.
I’ve found that you get to have either decimal degrees or meters. 
With that said, it’s quite easy to use the calculate geometry feature in ArcGI Pro after-the-fact to calculate the missing field if you need both decimal degrees and meters if you don’t need to use that data in the field immediately.

Hope this helps!

LindsayRaabe_FPCWA
MVP Regular Contributor

Thanks for the quick reply! I have experimented with custom basemap projections, but it was a while ago. I think my issue was going offline then became difficult (something to do with not being compatible with Esri's Imagery layers). 

I'm very familiar with the calculate values tool, and was thinking that might be the only option (this actually gets used on another layer in this way) but the issue is that the staff creating the features aren't always using Pro. Will think on it some more. Might be something I write in python to run nightly and calculate in the background. 

Lindsay Raabe
GIS Officer
Forest Products Commission WA
0 Kudos