开发者

Decoding unknown integer position format into more common (lat, lon) pair?

开发者 https://www.devze.com 2023-03-29 11:08 出处:网络
I am getting location data from a web service which looks like this (integer values): Latitude: 9188598

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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号