使用 import gdal,ogr,并给定一个 EPSG(例如这里 2154),python 中编写(几乎)空 MapInfo TAB 文件的代码是什么,或者只是投影的摘要行(TAB 格式):
CoordSys Earth Projection 3,999,0,0,0,0,7,3,46.5,44.0,49.0,700000,6600000
对于任何 EPSG 代码?
要将其与 ESRI 并列,以下行创建一个 .prj 文件:
from osgeo import osr
def make_prj(epsg, path_out):
proj=osr.SpatialReference()
proj.ImportFromEPSG(int(epsg))
with open(path_out, "w") as out:
print >>out, proj.ExportToWkt()
写,对于 epsg=2154 :
PROJCS["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"]]
TAB 文件是否有等价物?