[processing] Fix GdalUtils getSupportedRasters()

in order to correctly retrieve multiple extensions from GDAL drivers metadata DMD_EXTENSIONS instead of DMD_EXTENSION. See https://gdal.org/development/rfc/rfc46_gdal_ogr_unification.html#drivers-and-driver-registration
This commit is contained in:
Andrea Giudiceandrea 2021-02-25 07:36:19 +01:00 committed by GitHub
parent ae097d41c7
commit 91c8b23e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,8 +183,8 @@ class GdalUtils:
or metadata[gdal.DCAP_RASTER] != 'YES':
continue
if gdal.DMD_EXTENSION in metadata:
extensions = metadata[gdal.DMD_EXTENSION].split('/')
if gdal.DMD_EXTENSIONS in metadata:
extensions = metadata[gdal.DMD_EXTENSIONS].split(' ')
if extensions:
GdalUtils.supportedRasters[shortName] = extensions
# Only creatable rasters can be referenced in output rasters