2

I get these coordinates from a weather API which is totally undocumented :

"coordinates":["2615074.270000","6050614.270000"],"zoom":1

Do you have any idea what coordinate system it represents? How can I convert it to a lat/long system?

Thank you in advance!

adrianvlupu
  • 4,188
  • 3
  • 23
  • 29
Sebastian Nitu
  • 117
  • 1
  • 7

1 Answers1

3

I'm fairly certain the location is in Romania.

The coordinate system appears to be EPSG:3857 WGS 84 / Pseudo-Mercator and we're more used to EPSG:4326 WGS 84 (what gmaps is using).

Tip: proj4js is pretty useful for converting coords. Here's an example.

Joe - GMapsBook.com
  • 15,787
  • 4
  • 23
  • 68
  • Sir you are correct! Thanks for saving me tons of time searching! – Sebastian Nitu Jun 17 '20 at 21:42
  • By any chance, do you also have a formula on how I can covert this to WGS84? I am trying to implement this on a mobile app. – Sebastian Nitu Jun 17 '20 at 21:47
  • No prob! I'm assuming you're using swift and there's a package that looks OK: https://github.com/fangpenlin/Proj4Swift. The pseudomercator datum found at https://epsg.io/3857 is `+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs`, WGS 84 -- https://epsg.io/4326 -- is `+proj=longlat +datum=WGS84 +no_defs`. Plug those in and you should be good to go. – Joe - GMapsBook.com Jun 17 '20 at 22:04