Commit 7ee78052 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Update extract_metadata.py

parent 65a94e70
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
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)