I'm trying to write an attribute rule that would write that writes the Latitude coordinates to a field. However, the feature class I'm writing the rule on is projected in State Plane (Florida) in feet.
I have found some examples of Attribute Rules that can take data in UTM(meters) and "translates" that into Lat/Long. But that won't help here.
I need some concrete direction on 1) if this is even possible in Attribute Rules and 2) if so, what would that expression look like?
Solved! Go to Solution.
Hi @HeidiHarris and @DanPatterson ,
Unfortunately, Arcade does not yet provide the possibility to project a geometry to a different coordinate system. There are some examples that allow calculating the corresponding latitude and longitude coordinates when you have the standard Web Mercator Auxiliary Sphere as input coordinate system.
The case mentioned above uses a mathematical formula to calculate the corresponding WGS 1984 coordinates. In case you have the formula you can implement it in Arcade. However, this might be complex and sometimes not very precise.
What is the example?
If a rule can take coordinates from one system to another system, it most likely uses the "Project" tool/functionality under the hood.
Check your example again and see if all it requires is the existing coordinate system and the desired coordinate system.
There is no example. Looking for what the expression would use or look like at all.
Also since Attribute Rules are in Arcade, we're limited to those available functions. It cannot run GP tools like Project, as we could do in Python, for example.
Ah - on re-read I think you mean the example that can go from meters to lat-long. It's here:
https://community.esri.com/t5/arcgis-collector-questions/collector-aurora-custom-expressions-in-cust...
You can see it's basically only recalculating using basic arithmetic. No fancy reprojecting.
It appears to be suited for one spheroid, I would be concerned about accuracy
I have found some examples of Attribute Rules that can take data in UTM(meters) and "translates" that into Lat/Long.
This is what I was referring to. I will flag
@XanderBakker ... your domain.
FYI .... Project geometry must be implemented? or is if for featureclasses only and not useful for attribute domains
Hi @HeidiHarris and @DanPatterson ,
Unfortunately, Arcade does not yet provide the possibility to project a geometry to a different coordinate system. There are some examples that allow calculating the corresponding latitude and longitude coordinates when you have the standard Web Mercator Auxiliary Sphere as input coordinate system.
The case mentioned above uses a mathematical formula to calculate the corresponding WGS 1984 coordinates. In case you have the formula you can implement it in Arcade. However, this might be complex and sometimes not very precise.
Thank you, Xander. This is what I was starting to assume - it helps to have ESRI confirmation!