Processing Script

Fill nodata water pixels in DEM


image

DEMs often have voids (nodata cells) for water bodies. This script is designed to address that issue by filling each water body with a uniform elevation value. The script first identifies nodata cells in the DEM. It then applies a 1-pixel buffer around these nodata cells. This buffer helps to capture the adjacent valid elevation data which represent the edges of the water bodies. For each water body, the script calculates the minimum elevation within the buffered area. This minimum value is assumed to be the most appropriate fill elevation for the given water body. Optionally, the result can be improved by applying a sieve filter.

PCRaster
29 May 2025
30 May 2025
30 May 2025
Hans Kwast
water nodata digital elevation model

Great, thank you very much!

Reviewed by gabrieldeluca 2 weeks, 4 days ago

gabrieldeluca approved these changes 2 weeks, 4 days ago

This Processing Script is made available under the CC-0 license.

QGIS sustaining members

Flagship membership


Flagship membership


Large membership


Large membership


Large membership


Large membership


Large membership


Large membership


Large membership