[FWTools] .shp projection

Susana Iraiis Delgado Rodriguez susana.delgado_s at utzmg.edu.mx
Mon Oct 18 14:39:03 EST 2010


Hello list!

I'm trying to get the projection from a shapefile using a python script and
gdal, but it didn't work. I want to show the EPSG and UTM projection, my
code is:

from osgeo import ogr
from osgeo import osr
shapeData = ogr.Open(filepath)
layer = shapeData.GetLayer()
feature = layer.GetNextFeature()
spatial = layer.GetSpatialRef()
print spatial

The printing that shows to me, doesn't please me because it prints many
times "WGS_1984_UTM_Zone_13N", some of mt shapes don't work with this
projection, any idea what I'm doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20101018/4af2102c/attachment.htm 


More information about the FWTools mailing list