[gdal-dev] gdallocationinfo issues, after 3.9.2

Scott public at postholer.com
Tue Jul 8 11:55:43 PDT 2025


Say you have a file called raster.vrt. In that file are 15 tif's. 9 of 
those rasters don't have data (nodata) at the specified lon/lat:

gdallocationinfo -geoloc -valonly -field_sep "," rasters.vrt -88.730767 
32.649060

The above may return 6 values, with or without -field_sep:
26,2,2,0,3.10467481613159,32.7341842651367,1433

You have no idea which tif those values belong to. In versions 3.9.2 or 
earlier, it returns the 'nodata' value for each tif. Not only is nodata 
a valid value, it acts as a place holder. 15 rasters, 15 values returned.

Yes, you can remove the -valonly switch and use -xml, but then it 
becomes a parsing debacle. Unnecessary code and overhead.

Apologies for being a pain. I just rolled 3.11.1 and now 3.11.2 into 
production, up from 3.9.2 and it's breaking stuff I did not anticipate. :)

Thank you!
Scott

-- 
www.postholer.com



More information about the gdal-dev mailing list