3

我正在尝试使用 gdal 从多个局部坐标系中投影一些基本形状。ArcGIS 支持这些坐标系,但最终我只是想使用 gdal(和 proj4)将这些几何图形转换为基本的纬度/经度(EPSG:4326)。这是 gdalsrsinfo 返回的内容:

PROJCS["mylocalgrid",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Local"],PARAMETER["False_Easting",20289.634],PARAMETER["False_Northing",14781.765],PARAMETER["Scale_Factor",1.000179],PARAMETER["Azimuth",0.0],PARAMETER["Longitude_Of_Center",-109.675257803],PARAMETER["Latitude_Of_Center",32.9599048 58],UNIT["Foot_US",0.3048006096012192]]

如果我尝试使用 ogr 来翻译点 shapefile,我会收到以下错误:

ERROR 6: No translation for Local to PROJ.4 format is known.
Failed to create coordinate transformation between the
following coordinate systems.  This may be because they
are not transformable, or because projection services
(PROJ.4 DLL/.so) could not be loaded.
Source:

proj4 是否支持本地坐标系?有什么建议我应该用于 PROJECTION 参数吗?

谢谢。

4

1 回答 1

3

查看 ArcGIS 的Local Cartesian Projection文档,它说“此地图投影与正交投影相同”。因此,对于PROJECTION参数替换"Local""Orthographic",它应该可以工作。这是 Python 中的一个片段,向您展示发生了什么:

from osgeo import osr
p = osr.SpatialReference()
p.ImportFromWkt('PROJCS["mylocalgrid",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Orthographic"],PARAMETER["False_Easting",20289.634],PARAMETER["False_Northing",14781.765],PARAMETER["Scale_Factor",1.000179],PARAMETER["Azimuth",0.0],PARAMETER["Longitude_Of_Center",-109.675257803],PARAMETER["Latitude_Of_Center",32.9599048 58],UNIT["Foot_US",0.3048006096012192]]')
print(p.ExportToProj4())

显示 PROJ.4 字符串:

+proj=ortho +lat_0=32.959904858 +lon_0=-109.675257803 +x_0=6184.292811785623 +y_0=4505.490982981965 +ellps=WGS84 +units=us-ft +no_defs 

当然,最好测试一下它是否有效。

于 2014-11-16T23:46:46.837 回答