我需要编写一个函数,该函数可以将由latitude/longitue定义的某个位置投影到地图上的x,y坐标(图像)。lambert 2008投影
该地图本身似乎使用“比利时朗伯”作为投影类型。
我发现了一些有关此投影及其配置的官方信息:http://ign.be/FR/FR2-1-4.shtm和http://ign.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf(法文,我会翻译,如果需要)。
基本上,我得出的结论是,使用某些库会更容易一些(尽管这不是要求)。经过一番研究,看来OpenMap应该能够完成这项工作。
所以,这里是我走到这一步:
private Point mapCoordinatesToPoint(LatLonPoint latLonPoint) {
LatLonPoint centerLatLonPoint = new LatLonPoint(50.797815, 4.3592158333333333333333333333333);
Proj proj = new LambertConformal(centerLatLonPoint, 1, 1000, 1000, 4.3592158333333333333333333333333, 49.833333333333333333333333333333, 51.166666666666666666666666666667, 50.797815, 649328.0, 665262.0, Ellipsoid.GRS_1980);
return proj.forward(latLonPoint);
}
(知道我的GIF是1000×1000)的LamberConformal构造
我想我没有配置它的权利:一些点应该在地图上,xxx,给出这个结果:
x=-1766051.0; y=-1.6355546E7;
给人以“中心点”(?)作为参数给出
x=500.0; y=500.0;
(在地图的中间,这看起来不错)
任何人都熟悉,或者能够从链接图中的配置?
编辑:
试图用这种替代方法,从最后一行:
return proj.forward(latLonPoint.getLatitude(), latLonPoint.getLongitude(), new Point(), false);
而不是更好。