Opened 17 years ago
Closed 16 years ago
#1372 closed defect (fixed)
gdaladdo does not ignore NODATA values
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.0 |
Component: | GDAL_Raster | Version: | 1.4.0 |
Severity: | normal | Keywords: | overview average nodata |
Cc: | jay@… |
Description (last modified by )
Contrary to documentation gdaladdo does not ignore NODATA values when averaging. This was confirmed by warmerdam@pobox.com (via e-mail discussions.) Additionally, as a note, no special case handling appears to exist in the overview code for RGBA TIFF files (a special-case can be seen for RGB.)
Attachments (3)
Change History (9)
comment:1 by , 17 years ago
by , 17 years ago
Attachment: | gdal-1.4.2-fix-overview-nodata.patch added |
---|
comment:2 by , 17 years ago
See also ticket "[GDAL] #1721: [PATCH] GTiffDataset::IBuildOverviews doest not propagate NODATA to overview rasterband" : http://trac.osgeo.org/gdal/ticket/1721
comment:3 by , 17 years ago
An improved version of the patch that supports STRICT_NODATA mode. The '-strict_nodata' flag is added to gdaladdo. Man page updated accordingly.
by , 17 years ago
Attachment: | gdal-1.4.2-fix-overview-nodata-with-strict-nodata.patch added |
---|
comment:4 by , 17 years ago
Cumulative patch that adds minimum and maximum subsampling, only for simple data type (I guess minimum and maximum don't make sense for complex data type...)
by , 17 years ago
Attachment: | gdal-1.4.2-fix-overview-nodata-with-strict-nodata-and-min-max.patch added |
---|
comment:5 by , 16 years ago
Milestone: | → 1.5.0 |
---|---|
Priority: | highest → normal |
I've commited in trunk in r12497 something very close to gdal-1.4.2-fix-overview-nodata-with-strict-nodata.patch.
comment:6 by , 16 years ago
Component: | default → GDAL_Raster |
---|---|
Description: | modified (diff) |
Keywords: | overview average nodata added |
Resolution: | → fixed |
Status: | new → closed |
The attached patch handles the case where the raster band has a NODATA value while computing average. I've only fixed the 'simple type' case, as I'm not sure of if it's revelant for the 'complex type' case. It fixes the problem for int16 tiff images converted from DTED with nodata samples. As the ticket I've submitted to mapserver about WCS interpolation (http://trac.osgeo.org/mapserver/ticket/2181), it could be interesting to have a 'STRICT_NODATA' mode where the NODATA value is not simply ignored but also propagated. I'll maybe propose a patch for this.