Skip to content

ArchGDAL randomly infers wrong file type #5

Description

@adamchlus

I was unmixing a bunch of ISOFIT generated reflectance images and randomly on a single image got the following error:

ERROR: GDALError (CE_Failure, code 1):
	Driver ARCGEN is considered for removal in GDAL 3.5. You are invited to convert any dataset in that format to another more common one. If you need this driver in future GDAL versions, create a ticket at https://github.com/OSGeo/gdal (look first for an existing one first) to explain how critical it is for you (but the GDAL project may still remove it), and to enable it now, set the GDAL_ENABLE_DEPRECATED_DRIVER_ARCGEN configuration option / environment variable to YES.

It seems that sometimes the wrong file type is inferred. I was able to open the image with no problem with gdalinfo, QGIS and custom code. Weirdly the corresponding uncertainty image opened just fine with ArchGDAL.read

Limiting the types of drivers that can be used to all calls of ArchGDAL.read() and ArchGDAL.readraster() fixed the error:

ArchGDAL.read(FILE_NAME,alloweddrivers =["ENVI"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions