开发者

translate geolocation coordinates

I'm trying to translate latitude and longitude coordinates into coordinates of my own defined map. For instance:

51.876324 maps to 659.33 in my map 0.943395 maps to开发者_运维知识库 2585.17 in my map other such examples might be:

51.875737 - 505.77 0.943564 - 2055.39

51.875883 - 1090.58 0.944658 - 1935.42

My math skills/knowledge is kind of rusted, but should I use substitution to find out what is the factor by which the coordinates can be mapped into mine?

Any hints are appreciated Cheers!


It is not quite possible to answer this question exactly without knowing details about the map projection algorithm used. While lat and lon are angular coordinates on the earth (almost) ellipsoid the other seem to be map (x,y) coordinates.

If your map covers only a small part of the surface you might approximate this by a simple transformation

x = lon * factor_x + offset_x
y = lat * factor_y + offset_y

with constants factor_x, factor_y and offset_x and offset_y. From two distinct points on your map you may derive these constants by inversion:

factor_x = (x1-x2) / (lon1-lon2) 
offset_x = x1 - lon1 * factor_x

and same for y.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜