[Qgis-user] Raster calculator question

Andreas Neumann a.neumann at carto.net
Wed Apr 23 23:53:57 PDT 2014


Hi,

I have a hard time understanding the raster calculator syntax.

I would like to merge two rasters: DTM and lake mask. Let's call the one
dtm and the other lake_mask.

When the lake_mask has a value > 0 then I would like to take the value
of the lake_mask, otherwise the value of the dtm.

What would an appropriate syntax look like?

I tried something along

((lake_mask > 0) * lake_mask) OR dtm

But all I get in the resulting grid are values of 1. I guess it is
because it always evaluates to true?

Thanks for your help.

Andreas



More information about the Qgis-user mailing list