I have come across a set of poorly generated rasters which I need to align and regularize. I am open to any quick and dirty way to do this, but prefer QGIS since I have been using it for all my operations thus far.
The rasters contain positive ranges of floating point values, have a NODATA
value defined, but also have many cells containing nan
values. I would like to convert all nan values to the currently defined NODATA value. To achieve this, I tried many combinations of using the following:
- gdal raster calculator (using numpy
where
andisnan
functions) - raster calculator
- GRASS r.null tool
However I can't seem to get a workflow going. The gdal raster calc with numpy functions was close, but unfortunately theres no way of referring to the currently defined NODATA value by variable (as far as I know).
I would like to avoid using Python tools like rasterio since rasters should not be delivered in this format anyway (no use scripting this).
Does anyone have a way of achieving this?