In ArcGISOnline, I loaded a file of 159 counties and in the attribute table, created two additional fields, a lat and long. I added a calculated feature using Geometry($feature).x for the x value and similar for the y. The data doesn't appear to be degrees or radians. Am I missing a conversion? Thanks.
The lat / long of Appling County, GA is 31.7 deg N, 82.3 deg W.
The calculation for this county in ArcGIS is x = -9,160,360 and y = 3,730,477.
See screen shot.
Solved! Go to Solution.
meters, it appears to be in a Web Mercator projection
meters, it appears to be in a Web Mercator projection
These are coordinates in meters using the Web Mercator projection.
Thanks for the fast reply. I was able to find additional help on how to convert the meter data to lat/lon in degrees and add latitude and longitude fields in my attribute table. Lat/Long unit conversion with Arcade
Since I had to tweak it a little to use in my ArcGISOnline attribute table, I thought i would add some additional instructions:
I added two additional fields to the attribute table, one for Latitude and one for Longitude.
Add the latitude field as type 'double,' click 'calculate' and add the arcade script:
var y = Geometry($feature).y
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lat = (y / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);
lat
Add the longitude field of type 'double', click 'calculate' and add the arcade script:
var x = Geometry($feature).x
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (x / originShift) * 180.0;
lon