Created
October 5, 2020 18:47
-
-
Save richpsharp/f0d17201e8d72c0f0962376e18da120f to your computer and use it in GitHub Desktop.
IsProjected vs. EPSGTreatsAsLatLong
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 | |
projection_wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' | |
srs = osr.SpatialReference() | |
srs.ImportFromWkt(projection_wkt) | |
print(projection_wkt) | |
print(f'''IsProjected: { | |
srs.IsProjected()}. EPSGTreatsAsLatLong: {srs.EPSGTreatsAsLatLong()}''') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment