Created
August 5, 2015 02:22
-
-
Save minorua/221ca7a2d4e434f91541 to your computer and use it in GitHub Desktop.
[snippet] transform coordinates using osr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from osgeo import osr | |
srin = osr.SpatialReference() | |
srin.ImportFromEPSG(4326) | |
srout = osr.SpatialReference() | |
srout.ImportFromEPSG(3857) | |
trans = osr.CoordinateTransformation(srin, srout) | |
trans.TransformPoint(135, 34) | |
#(15028131.257091938, 4028802.0261344104, 0.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment