Skip to content

Instantly share code, notes, and snippets.

Created December 18, 2012 16:27
Show Gist options
  • Save anonymous/4329431 to your computer and use it in GitHub Desktop.
Save anonymous/4329431 to your computer and use it in GitHub Desktop.

Revisions

  1. @invalid-email-address Anonymous created this gist Dec 18, 2012.
    8 changes: 8 additions & 0 deletions osr example
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    >>> 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 '
    >>>