我正在实施带有插入的GPX曲目的3D曲面,如本博客所述:http://blog.mastermaps.com/2013/11/showing-gps-tracks-in-3d-with-threejs.html
我的3D地图是使用RGF93投影用QGIS制作的自定义地图,我无法在d3.js中找到好的投影
我的地图的gdalinfo是
["RGF93 / Lambert-93",
GEOGCS["RGF93",
DATUM["Reseau_Geodesique_Francais_1993",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6171"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4171"]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",49],
PARAMETER["standard_parallel_2",44],
PARAMETER["latitude_of_origin",46.5],
PARAMETER["central_meridian",3],
PARAMETER["false_easting",700000],
PARAMETER["false_northing",6600000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
AUTHORITY["EPSG","2154"]]
Origin = (585097.372746756765991,6171321.216855648905039)
Pixel Size = (15.149120309400001,-14.887674158699999)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 585097.373, 6171321.217) ( 1d36' 3.31"E, 42d37'56.65"N)
Lower Left ( 585097.373, 6165946.766) ( 1d36' 7.48"E, 42d35' 2.74"N)
Upper Right ( 590475.310, 6171321.217) ( 1d39'59.00"E, 42d37'59.67"N)
Lower Right ( 590475.310, 6165946.766) ( 1d40' 2.98"E, 42d35' 5.75"N)
Center ( 587786.342, 6168633.992) ( 1d38' 3.19"E, 42d36'31.22"N)
Band 1 Block=355x5 Type=Float32, ColorInterp=Gray
Computed Min/Max=1735.500,2908.485
NoData Value=-3.4028234663852886e+38
我尝试的投射(在许多其他组合中),但未实现成功。我可以看到当刻度(1)时点被放置在表面的中心,但是当增加刻度值时,它会移动很远。
var projection = d3.geoConicConformal()
.rotate([-3, 0])
.center([1.6342194, 42.6086722])
.parallels([49, 44])
.translate([100, 100])
.scale(terrain.map);
我想知道我做错了什么,以及我投射的适当值是什么。
修改
我几乎找到了解决方案:
var projection = d3.geoConicConformal()
.rotate([-terrain.center[1], 0])
.center([0, terrain.center[0]])
.parallels([44, 49])
.translate([100, 100])
.scale(terrain.map);
其中terrain.center [lat,lon]是来自gdalinfo' s Corner Coordinates:Center的值。
即使不完全准确,积分几乎与他们的预期位置相符;它们似乎有点逆时针旋转。我尝试使用旋转值,但它只是将所有投影向左或向右翻译。