[gdal-dev] Unsure about significance of nodata:null in raster:bands

Even Rouault even.rouault at spatialys.com
Tue Nov 4 17:07:27 PST 2025


Hi,
>
> When using gdal raster info I have noted that in the "raster:bands" 
> section (with output format set to default json) the nodata value of 
> float rasters is always reported as "null". All attempts to change or 
> set the nodata value seem unable to fix this. It only happens with 
> float rasters - if you convert a float raster to int with 
> gdal_translate, nodata is correctly reported. If you convert it back 
> to float, it becomes null again. I've tried this on a few rasters and 
> it seems consistent. All were GTiff format.
This is a bug specific to the STAC relate part of JSON output. Will be 
fixed per https://github.com/OSGeo/gdal/pull/13333
>
> I was curious about this because I've been investigating an issue 
> where raster2pgsql is seemingly refusing to recognize and not write 
> empty tiles (as it should be without the -k flag). I was curious if 
> this could be a bug or some other occurrence whereby it's not 
> recognizing the nodata value of the raster properly, therefore leading 
> to always writing the full raster.
>
> I know raster2pgsql specific questions aren't for here, I will make a 
> similar mail to the postgis-users mailing list soon, I was just giving 
> context.

Not sure about the raster2pgsql issue, but definitely not related to the 
above bug.

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list