proj.4 字符串转成Esri wkt字符串的方法

proj.4 字符串转成Esri wkt字符串的方法
使用gdal/ogr库进行转换
import os
import sys
import string
import osgeo.osr

if (len(sys.argv) <> 2):
print ‘Usage: proj2wkt.py [Proj4 Projection Text]’
else:
srs = osgeo.osr.SpatialReference()
srs.ImportFromProj4(sys.argv[1])
srs.MorphToESRI() //重点,转成Esri的wkt格式
print srs.ExportToWkt()

This entry was posted in ArcGIS.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">