2
En utilisant import gdal, ogr, et donné un EPSG (par exemple ici 2154), quel est le code en python pour écrire un fichier TAB MapInfo (ou presque) vide, ou juste la ligne de résumé de la projection (format TAB):Python GDAL/OGR: comment créer un fichier TAB MapInfo?
CoordSys Earth Projection 3,999,0,0,0,0,7,3,46.5,44.0,49.0,700000,6600000
pour tout code EPSG?
juxtaposer que, avec Esri, les lignes suivantes créent un fichier .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()
qui écrit, pour 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"]]
Y at-il un équivalent pour un fichier TAB?