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

Lorenzo Curcio lorenzocurcio2 at gmail.com
Tue Nov 4 16:42:25 PST 2025


Hi all.

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.

Is this a known thing? Is there any meaning or significance to it? The
separate "bands" section in gdal raster info output does always correctly
output the nodata value, which is a bit confusing.

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.

If this isn't the right place to ask this question, sorry and please let me
know where the right place is.

Thanks, Lorenzo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20251105/55334a9e/attachment.htm>


More information about the gdal-dev mailing list