Quantcast
Channel: Active questions tagged raster-calculator - Geographic Information Systems Stack Exchange
Viewing all articles
Browse latest Browse all 188

QGIS: overwrite part of a raster by another raster

$
0
0

I am trying to create a single raster file that divides the region of Antwerp, Belgium into 5 categories: high green, low green, agriculture, water, and build-up area. For this, I will have to combine two raster files I already have:

  1. I have a raster that shows at a certain resolution different categories of vegetation. The legend is as follows: 1 = High green (dark green); 2 = low green (light green); 3 = agriculture (yellow); and 4 = other (grey) (see figure below).enter image description here

  2. Another raster shows where there is water in the same area (Legend: 6 = water (blue)) (see figure below where this raster layer is shown on top of the first).enter image description here

What I want to do is to keep the values 1, 2, and 3, and then overwrite the values '4' (other) with '6' (water), but only there where there is water present. The other values '4' should remain the same.

I believe I will have to run some kind of raster calculator line, but I am lost as to which one that would be.

Here is a link to a part of both the vegetation and water datasets: https://we.tl/t-dfXUKHhDxS


Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>