I am adding geometry fields using Arcade Geometry($feature).x and Geometry($feature).y. Since my target feature layer is in Web Mercator projection, my custom lat & long fields are displaying the values in meter. Is there a way to convert this to decimal degrees with arcade function?
Solved! Go to Solution.
Hey Xander,
I have a point feature federated service in UTM NAD83 Zone16. And, I have an x and a y column that I want to populate in decimal degrees using arcade. Is it possible? What do I need to do? Here is my email address, Xander: abi.dhakal@forestry.alabama.gov
Thank you,
Abi
@XanderBakker also looking to convert from CA State plane zone 6 NAD83 into decimal degrees... all the examples I'm finding online seem to be converting from the default Web Mercator. Not sure it is possible.
hello, I tried to use this function, but it gave an error when testing, I wanted the fields of the layer to automatically have the coordinates
thanks
@XanderBakker how are you determining the value "6378137.0"?
I am trying to use this NICE! Function you created but I think I am missing this portion.
Im trying to convert x/y NAD83 New Jersey State Plane(EPSG:3424) coordinates to WGS84(EPSG:4326)
here is an example of the x/y coordinates:
x = 570384, y= 475445
I should get the following in lat/lon
-74.2201199 (long), 40.13836 (lat)
Did you get a response to this or find a solution? I need the same.
Is there any way to make this into an attribute rule?
I am not entirely clear on the formula.
I imagine the constant (6378137.0) is the semimajor axis, but why multiply by 2 and divide by 2? Doesn't that produce the same? could it be power instead of multiplication?
Is there an arcade code similar to this to show easting/westing?
Thank you! I had a Rest endpoint with only x,y in the attributes.
Your arcade worked perfectly to be able to use google directions
It would be great to have some increased functions added to arcade to include ToLatitude(geometry($feature).x) and ToLongitude(geometry($feature).y)
Please consider adding a kudo to this idea
Covert point geometry to Latitude and Longitude - Esri Community