[gdal-dev] gdalwarp: behavior of "mode" resampling with NODATA

Jed O. Kaplan jed.kaplan at arve-research.com
Wed Dec 30 03:03:24 PST 2020


Working with GDAL 3.0.4

The behavior of “mode” resampling when NODATA pixels are present is not clear to me from reading the documentation. I guess there are two possibilities:

1) If NODATA is the modal value among the pixels under consideration, then the result is NODATA
or
2) The modal value among the pixels under consideration is taken in exclusion of NODATA, so that a NODATA will be returned only if ALL of the pixels in the resampling window are NODATA.

I would prefer if it was (2) above, but I would be grateful if anyone could confirm how the filter works.

Many thanks,

Jed






More information about the gdal-dev mailing list