0

I’m trying to use wikimapia API.

The coordinates that I receive from them looks like e.g. X=148163437, Y=99238706 for a place with lat=42.406425N, lon=18.702075E. What’s even more funny, objects residing in Argentina (both latitude and longitude are negative) still have positive coordinates.

How do I convert coordinates from Wikimapia’s proprietary coordinate system into the normal one?

P.S. I'm requesting JSON data with Mercator option.

Soonts
  • 18,116
  • 9
  • 55
  • 116
  • You say "e.g. X=148163437, Y=99238706" Are those the actual values or values you made up? What are the actual numbers you get back? – John Sep 20 '13 at 23:38
  • @John, it's the actual values, namely the north-west coordinate of some ancient church on an island nearby. – Soonts Sep 20 '13 at 23:58
  • 1
    http://stackoverflow.com/questions/14329691/covert-latitude-longitude-point-to-a-pixels-x-y-on-mercator-projection – Preston Guillot Sep 21 '13 at 00:17

1 Answers1

1

This looks like a quadtree system sometimes used for co-ordinate storage. By design it allows for quick indexing, and simple recollection of data. Essentially the 360 by 180 planet is divided up into 4 quadrants (or any multiple thereof - usually less than 8 if pure numericals are used. but can be expanded if alphanumericals are adopted). Each resulting division further divided, and so on. Ie the top left most block will be 1111 in a system where a simple recursive quartering is used 4 times.

I am afraid that unless you know the strategy that was implemented, deciphering the actual allocation can only be calculated is you have a good distribution of know co-ordinates and their quadtree counterparts.

Please note this is my take of your post . . .

GeoManiac
  • 11
  • 1