Skip to content

Instantly share code, notes, and snippets.

@lb1a
Forked from anonymous/osr example
Created December 18, 2012 16:29
Show Gist options
  • Save lb1a/4329457 to your computer and use it in GitHub Desktop.
Save lb1a/4329457 to your computer and use it in GitHub Desktop.
>>> from osgeo import gdal, osr
>>> ds = gdal.Open('C:/Users/kshannon/Desktop/test.tif')
>>> sr = osr.SpatialReference()
>>> sr.ImportFromWkt(ds.GetProjection())
0
>>> sr.ExportToProj4()
'+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m +no_defs '
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment