好的,我有这些来自 Google 地球的图像叠加数据,如下所示:
North: -7.340917
South: -7.34100
East: 112.751217
West: 112.751167
Rotation: 25.0000
并且我已经成功地将我的图像点 (x,y) 转换为 Lat, Lng 与这些功能:
static Double DEGREES_PER_RADIAN = 180 / Math.PI;
static Double RADIAN_PER_DEGREES = Math.PI / 180;
public static double Gudermannian(double y)
{
return Math.atan(Math.sinh(y)) * DEGREES_PER_RADIAN;
}
public static double GudermannianInv(double latitude)
{
double sign = Math.signum(latitude);
double sin = Math.sin(latitude * RADIAN_PER_DEGREES * sign);
return sign * (Math.log((1.0 + sin) / (1.0 - sin)) / 2.0);
}
Double mapLatNorth = -7.340917;
Double mapLatSouth = -7.34100;
Double mapLonWest = 112.751167;
Double mapLonEast = 112.751217;
Double ymax = GudermannianInv(mapLatNorth);
Double ymin = GudermannianInv(mapLatSouth);
Float latPoint = (float) Gudermannian(ymax - ( ((double) pointY / imgHeight) * (ymax - ymin) )) ;
Double mapLonDelta = mapLonEast - mapLonWest;
Float lngPoint = (float) (mapLonWest + pointX / imgWidth * mapLonDelta);
我从中得到的价值观
latPoint
和
lngPoint
是正确的,但是它还没有旋转。我的问题是:如何将这些纬度/经度值旋转 25 度?
我未能从 Ewan Todd 在从 kml-file 计算地面覆盖角的纬度/经度值中获得纬度/经度值