[gdal-dev] Are noData values ignored when resampling an image using the bilinear algorithm in gdal.warp?

Hiscoke, Edward edward.hiscoke at sogeti.se
Thu Sep 22 03:05:49 PDT 2022


Hi all,
I have a question about resampling using gdal.warp from Python.
I'm doing a bilinear resampling of the bands of a Sentinel 2 image to match resolutions between bands. My question is if using bilinear sampling will include noData value in the resampling calculation?
Looking at the documented available resampling methods, only near, bilinear, cubic, cubicspline, lanczos do not mention only using non-NODATA in their description.
Ideally nodata is nodata and should not be part of the calculation. But is this perhaps not possible for these calculations?

In the GDAL chat someone suggested creating a validity mask, resampling it to the correct resolution and then using it for filtering results, but that would perhaps not either give the correct results if noData is included in the calculation.

Kind regards, Edward Hiscoke

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220922/a57d9259/attachment.htm>


More information about the gdal-dev mailing list