【发布时间】:2015-09-25 07:38:07
【问题描述】:
我在 equirectangular 投影中有一个地图。我知道 (lat,lon) 在左上角和右下角的位置。现在我知道我可以像这样计算 (x,y):
x = ((lon + 180) * (map_width / 360))
y = (((lat * -1) + 90) * (map_height / 180))
但是,这似乎会产生错误的坐标。我的猜测是我必须考虑我的图像的左上角和右下角(纬度,经度)。
所以我尝试了这种方式(left、top、right、bottom_lon 代表我的图像边界):
x = ((lon + left_lon) * (map_width / (right_lon - left_lon)))
y = (((lat * -1) + top_lat) * (map_height / (top_lat - bottom_lat)))
但我仍然没有得到正确的结果。我做错了什么?
【问题讨论】:
标签: gis latitude-longitude projection