Skip to content

Instantly share code, notes, and snippets.

@mauriciodev
Created August 1, 2011 17:41
Show Gist options
  • Save mauriciodev/1118607 to your computer and use it in GitHub Desktop.
Save mauriciodev/1118607 to your computer and use it in GitHub Desktop.
GDAL coordinate transformation example
import osr
srE=osr.SpatialReference() #spatial reference Entrada
srE.ImportFromEPSG(4291) #wgs latlon
srE.ExportToWkt()
srS=osr.SpatialReference() #spatial reference Saida
srS.ImportFromEPSG(29181) #wgs utm 21S
srS.ExportToWkt()
ct=osr.CoordinateTransformation(srE,srS)
ct.TransformPoint(-50,-35)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment