[Qgis-user] reclass raster nodata=0

Raymond Nijssen r.nijssen at terglobo.nl
Fri Dec 30 02:35:41 PST 2016


I'd like to reclass a raster that contains just cells with values nodata 
and 1. (I created it by rasterizing a polygon layer.)

Now I want to change all nodata values to 0, but I cannot find any way 
to do this. I tried the grass and gdal tools and the qgis raster 
calculator, but without luck.

Does anyone know?

Thanks!
Raymond


PS

In fact I have 2 of these layers and I want to "union" them. So I tried:

raster1 OR raster2

in the calculator, but that only returns 1 for the cells that contain a 
1 in both input rasters, resulting in the overlapping area.

By changing nodata to 0, I'm hoping to calculate:

(raster1 + raster2) ^ 0

and get my desired results.

Any ideas on this?



More information about the Qgis-user mailing list