[PostGIS] #6010: ST_SetBandNoDataValue can't handle infinite no data
PostGIS
trac at osgeo.org
Mon Nov 10 13:22:20 PST 2025
#6010: ST_SetBandNoDataValue can't handle infinite no data
-------------------------+-------------------------------------------------
Reporter: | Owner: robe
GISuser5432 |
Type: defect | Status: new
Priority: low | Milestone: PostGIS 3.6.1
Component: raster | Version: 3.6.x
Resolution: | Keywords: ST_Polygon (raster) ; Raster;
| PostGIS_Raster;
-------------------------+-------------------------------------------------
Comment (by pramsey):
So, without actually running this through the debugger, I'm wondering if
this section where we call into GDAL is where things fall apart.
{{{
if (iBandHasNodataValue) {
size_t sz = 50 * sizeof (char);
pszQuery = (char *) rtalloc(sz);
snprintf(pszQuery, sz, "PixelValue != %f", dBandNoData );
OGRErr e = OGR_L_SetAttributeFilter(hLayer, pszQuery);
if (e != OGRERR_NONE) {
rtwarn("Error filtering NODATA values for band.
All values will be treated as data values");
}
}
else {
pszQuery = NULL;
}
}}}
Because we're asking the system to use a pretty funky value, and we're
also passing it out to text and then (in GDAL) back into float, so there
are places where things could go awry. Also presumably inside GDAL we're
evaluating `Inf==Inf` which could have its own failure modes. All this to
say, it's not 100% certain this is even fixable.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6010#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list