1

I need to pass user's GPS coordinates from the iOS app to the backend server. The iOS Location Services uses EPSG:4326 (also known as WGS 84) but the back end expect them in EPSG:900193

Does anyone have any information on how to transform the lat/long values to EPSG:900193 in the iOS app before sending them out?

My google fu is failing me. Searches didn't come up with anything I could use. Is there are formula, or a library that I can use?

subjective-c
  • 1,833
  • 9
  • 25
  • 35
  • it dawned on me why your *goolge fu* was failing you. EPSG:900193 is actually EPSG: *900913* as it's 1337 for *google* c.f., http://crschmidt.net/blog/archives/243/google-projection-900913/ – Nodak Feb 20 '15 at 04:08

2 Answers2

0

EPSG:900193 is also know as Web Mercator, which was originally called Spherical Mercator

Wikipedia has a formula for conversion to Web Mercator

The Google Maps / Bing Maps Spherical Mercator Projection has additional information, and as does Conversion of British National Grid (WKID:27700) to WGS84(WKID:4326) and then to Web Mercator (WKID:3857)

The links will get you going, the last link has a javascript for conversion, which may, or may not suit your requirements.

Edit: Doing some light reading I found this interesting Java code for WGS84 to Google map position and back and this gem http://spatialreference.org/ref/sr-org/google-projection/

The biggest problem with all of the name changes...are they talking about the same thing?

Community
  • 1
  • 1
Nodak
  • 929
  • 1
  • 8
  • 14
0

I recommend you look at the PROJ.4 Cartographic Projections library and its translations to many languages/platforms. For your particular case you may want to look at the Changing Ellipsoid / Why can't I convert from WGS84 to Google Earth / Virtual Globe Mercator? FAQ

jwd630
  • 4,529
  • 1
  • 20
  • 22