ArchGDAL.jl icon indicating copy to clipboard operation
ArchGDAL.jl copied to clipboard

LIBERTIFF introduction issues

Open visr opened this issue 5 months ago • 4 comments

This test:

https://github.com/yeesian/ArchGDAL.jl/blob/05ed896636cc3b65c382179158572e373a26d7aa/test/test_drivers.jl#L54-L56

Caused many subsequent tests to fail when updating to GDAL 3.11: https://github.com/JuliaGeo/GDAL.jl/pull/195 After these lines are run it will try to open all GeoTiff files with the read only LIBERTIFF driver that was added in 3.11. I don't know if that is because these lines mess up the order in which drivers are applied, or something else.

I'll apply the test now on another driver which won't mess up the other tests, but it may be good to try to understand this.

visr avatar Jul 11 '25 21:07 visr

Additionally now we get extensiondriver("/my/file.tif") == "LIBERTIFF". But that has to do with the extensions function that doesn't consider multiple drivers may support the same extension. In this case we probably want to return "GTiff" since that is what GDAL defaults to for .tif.

visr avatar Jul 11 '25 21:07 visr

Yes changes like that to extensiondriver are seriously breaking for Rasters.jl

rafaqz avatar Jul 11 '25 23:07 rafaqz

Maybe we should just skip LIBERTIFF in the extensions loop over all drivers for now?

EDIT: Done in #476.

visr avatar Jul 12 '25 04:07 visr

The last driver for eacht ext is picked. I left out ndriver = 1 since there is no issue there. In 7419f87d77a11aa951f8bbd0570b846a2e41485d I now add overrides to ensure the right driver for .json, .geojson, .tif and .tiff. Clearly a temporary fix.

ext shortname ndrivers
bin NSIDCbin 2
bin NGSGEOID 2
gdb OpenFileGDB 2
gdb GPSBabel 2
gif GIF 2
gif BIGGIF 2
grd GSBG 4
grd GS7BG 4
grd RRASTER 4
grd NWT_GRD 4
h5 S102 4
h5 S104 4
h5 S111 4
h5 HDF5 4
hdr COASP 3
hdr MFF 3
hdr SNODAS 3
img HFA 2
img SRP 2
json ESRIC 6
json STACTA 6
json GeoJSON 6
json ESRIJSON 6
json TopoJSON 6
json JSONFG 6
kml KMLSUPEROVERLAY 2
kml KML 2
map PCRaster 2
map WAsP 2
mdb ODBC 2
mdb PGeo 2
osm OSM 2
osm GPSBabel 2
pbf OSM 2
pbf MVT 2
ter Leveller 2
ter Terragen 2
tif GTiff 3
tif COG 3
tif LIBERTIFF 3
tiff GTiff 3
tiff COG 3
tiff LIBERTIFF 3
xml ECRGTOC 4
xml PDS4 4
xml LVBAG 4
xml GML 4

visr avatar Jul 12 '25 05:07 visr