[GIS] Updating/replacing raster values in one raster values from another in QGIS

qgisrasterraster-calculator

I have two rasters: one that is a land cover map (cropland data layer) and the other is a rasterized polygon representing cranberry fields that aren't represented in the land cover raster that I have. I would like to replace the values of the land cover map with the value from the cranberry raster. The values of the land cover raster under the cranberry field raster are variable (from among 8 categories).

I assume the raster calculator is used for this, but I have little experience with that tool.

Image of the cranberry field raster:
enter image description here

Image of the land cover raster with cranberry raster overlaying:
enter image description here

Best Answer

OK - after some extensive googling and a fair bit of hair ripped out, I found a solution.

Instead of using a the raster calculator, I used a shape file for the marshes, and "rasterized" them. Instead of specifying a new .tiff, I wrote over the land cover raster that I wanted to update, and boom. Done. Not sure if that is the "correct" way, but it works for what I need.

Related Question