[gdal-dev] gdal_fillnodata - odd artifacts

Stephen Knox stephenknox73 at gmail.com
Fri Feb 9 07:10:18 PST 2024


Hi all,

I'm seeing an odd artifact when using gdal_fillnodata.py.

My source raster is (https://i.stack.imgur.com/t42tR.png)
(purple is no data, white and black are two different numeric values).

Using a mask exactly corresponding to the no data pixels (i.e. all no
data pixels are set to 0 in the mask raster, and all others set to 1)
and running the following command:

gdal_fillnodata.py -md 20 -mask path_to_mask.tif path_to_raster.tif output.tif

I get the following output: https://i.stack.imgur.com/S6UYm.png

The thing I am confused about is the rectangular area of slightly
lighter pixels to the bottom left of the image - it seems very
uniform, and I can't see anything obvious in the source raster that
would cause that. It does become less prominent when smoothing is
used, but the anomaly is still there.

Is this an expected artefact of the algorithm, or potentially a bug?

Source image: https://drive.google.com/file/d/1xyGZE3alZxvutHGb_F7zs-bOjFAZQZis/view?usp=drive_link

Mask image: https://drive.google.com/file/d/14H9ZIb29dZ3j-dxkGfXONVgByZn5TsY1/view?usp=drive_link

Result image: https://drive.google.com/file/d/1Sb4bQv7hDfUDfziQtpgVKYKvrkotPghE/view?usp=drive_link


More information about the gdal-dev mailing list