转换经度&具有校准点的地图上的纬度到X Y [英] Converting Longitude & Latitude to X Y on a map with Calibration points

查看:127
本文介绍了转换经度&具有校准点的地图上的纬度到X Y的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个尺寸为sizeX,尺寸为y

If i have a jpeg map with size sizeX, sizeY

和地图上某些校准点(X,Y,Lon,Lat)的jpeg地图, b
$ b

用给定的经度/纬度对计算地图中相应XY点的算法是什么?

and some calibration points on the map (X, Y, Lon, Lat)

推荐答案

MAP_WIDTH / 360.0)*(180 + lon));
int y =(int)((MAP_HEIGHT / 180.0)*(90 - lat));

int x = (int) ((MAP_WIDTH/360.0) * (180 + lon)); int y = (int) ((MAP_HEIGHT/180.0) * (90 - lat));

Lat,lon坐标是Android设备给我的。所以他们应该采用所有Google Earth / Map产品使用的相同标准。

The lat,lon coordinates were given to me by Android devices. So they should be in the same standard used by all Google Earth/Map products.

这篇关于转换经度&具有校准点的地图上的纬度到X Y的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆