Skip to content
Snippets Groups Projects
Commit 7ee78052 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Update extract_metadata.py

parent 65a94e70
No related branches found
No related tags found
No related merge requests found
try:
from osgeo import osr
hasosr = True
except:
hasosr = False
import_options = ['ImportFromWkt', 'ImportFromProj4',
'ImportFromEPSG', 'ImportFromUSGS',
......@@ -20,7 +25,10 @@ def extract_projstring(proj_string):
OSR spatial reference object
"""
if hasosr:
srs = osr.SpatialReference()
else:
return
for import_option in import_options:
try:
func = getattr(srs, import_option)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment