4

I am receiving some JSON feed with this data

"geometryType": "esriGeometryPoint",
"spatialReference": {
    "wkid": 102100,
    "latestWkid": 3857
  },

and set of coordinates like

"geometry": {
   "x": -11696523.780400001,
   "y": 4804891.0001000017
}

If there a way to convert this x and y to lat/lng which I can use in Google Maps?

I have read some references but there either I can`t see the answer, or it's goes very deep into GIS terminology which I just can't afford to learn at the moment.

4
  • 1
    Is all your data in : "latestWkid": 3857? How do you want to change it? Have you looked at Projecting it to Lat-long using Python & proj4? Commented Apr 4, 2018 at 9:47
  • There nothing I can change, so I assume all data in "latestWkid": 3857 whatever it means. I briefly looked documentation for Proj4, and well it's very dark forest for me,I mean there are some information for "unit conversions" but no examples whatsoever.
    – MikeKlemin
    Commented Apr 4, 2018 at 9:59
  • 1
    Please edit the question to specify what GIS tool(s) you have available, and what you have tried. Stating that you can't be bothered to learn is rather disturbing.
    – Vince
    Commented Apr 4, 2018 at 10:41
  • I fully understand disturbing part. There is answer bellow I accepted, it's all I need.
    – MikeKlemin
    Commented Apr 4, 2018 at 12:09

3 Answers 3

5

You could use the ArcGIS server REST endpoint to convert to wkid 4326 (lat/lon). Here's a URL for one of Esri's sample servers:

https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?inSR=102100&outSR=4326&geometries=%7B%0D%0A++%22geometryType%22+%3A+%22esriGeometryPoint%22%2C%0D%0A++%22geometries%22+%3A+%5B%0D%0A+++++%7B%0D%0A+++++++%22x%22+%3A+-11696523.780400001%2C+%0D%0A+++++++%22y%22+%3A+4804891.0001000017%0D%0A+++++%7D%0D%0A++%5D%0D%0A%7D&f=HTML

ArcGIS projection engine

Pasting the coordinate in google maps gives you this (Littleton, right?):

https://maps.google.com/?q=39.5785846502541+-105.071660830008

If you just need to convert the occasional coordinate this will work fine, but I guess as soon as it's thousands of coordinates, you are going to want to automate stuff.

As for the meaning of latestWkid, see here: https://support.esri.com/en/technical-article/000013950

0
1

Based on Berend, the quickest link is:

https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project

Then see it on google map

https://maps.google.com/?q=39.5785846502541+-105.071660830008

1

For a formula that you can implement, see this page for an explanation and scroll down the bottom for various implemenations 3857 to/from 4326

Python Implementation provided:

def MetersToLatLon( mx, my ):
    "Converts XY point from Spherical Mercator EPSG:900913 to lat/lon in WGS84 Datum"

    lon = (mx / originShift) * 180.0
    lat = (my / originShift) * 180.0

    lat = 180 / math.pi * (2 * math.atan( math.exp( lat * math.pi / 180.0)) - math.pi / 2.0)
    return lat, lon
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.