I am getting location data from a web service which looks like this (integer values):
- Latitude: 9188598
- Longitude: 1155331
I know the location real-world location to be:
- Latitude: 63.358523151
- Long开发者_高级运维itude: 10.378122700
What is the magic mapping between the formats?
Some web mapping sites (Google, OpenStreetMap) use a simple Spherical Mercator projection, also known as EPSG:900913.
The formulas for converting between lat/long and Spherical Mercator are listed at http://wiki.openstreetmap.org/wiki/Mercator
Unfortunately, there is a shift of about 100m between your example point and the results of these formulas.
Maybe this inaccuracy is acceptable?
If not, you have to find more information about the projection. It will be some variation of Mercator, probably with an ellipsoid different to WGS84 that is used in Spherical Mercator. An ellipsoid contains two measurements of Earth radius (or only one if Earth is being interpreted as a sphere). WGS84 is 6378137m and 6356752.3142m. It is also possible that there is a geodetic datum shift required but that is the less likely solution.
精彩评论