Search This Blog

Friday, 17 March 2017

Python program to extract Spatial reference of shape file

from osgeo import ogr

shapefile = ogr.Open('D:/vector/India/IND_adm2.shp')

layer = shapefile.GetLayer(0)
##Get Projected Spatial reference

sr = layer.GetSpatialRef()
print sr

geogr_sr = sr.CloneGeogCS()

No comments:

Post a Comment