greenwich/raster.py
def driver_for_path(path, drivers=None):
    """Returns the gdal.Driver for a path or None based on the file extension.

    Arguments:
    path -- file path as str with a GDAL supported file extension
    """
    ext = (os.path.splitext(path)[1][1:] or path).lower()
    drivers = drivers or ImageDriver.registry if ext else {}
    for name, meta in drivers.items():
        if ext == meta.get('DMD_EXTENSION', '').lower():
            return ImageDriver(name)
    return None
def driver_for_path(path, drivers=None):
    ext = (os.path.splitext(path)[1][1:] or path).lower()
    drivers = drivers or ImageDriver.registry if ext else {}
    for name, meta in drivers.items():
        if ext == meta.get('DMD_EXTENSION', '').lower():
            return ImageDriver(name)
    return None
def driver_for_path ( path , drivers = None ) : ext = ( os . path . splitext ( path ) [ 1 ] [ 1 : ] or path ) . lower ( ) drivers = drivers or ImageDriver . registry if ext else { } for name , meta in drivers . items ( ) : if ext == meta . get ( 'DMD_EXTENSION' , '' ) . lower ( ) : return ImageDriver ( name ) return None
Returns the gdal.Driver for a path or None based on the file extension.

    Arguments:
    path -- file path as str with a GDAL supported file extension
Returns the gdal . Driver for a path or None based on the file extension .