I'm doing some sieve mapping in GRASS. I have several map layers containing various values representing site suitability ranks.

I need to use r.mapcalc to add these maps together for example map1 + map2 + map3. However, I need to take into account the weightings of each map layer so during the mapcalc I need the values in each map layer to be multiplied by their respective weight. Is there any way to do this?

In the same way you would do something like if(isnull(map1), 0, 1) + if(isnull(map2), 0, 1).


As the saying goes: "There's more than one way to cook an egg" Have a look at r.series. This module allows to combine a series of raster maps in many ways, including applying a list of weights.

i.e. (assuming a linux bash command shell:

MAP_LIST=`g.list type=rast pattern=map*`
r.series input=$MAP_LIST method=sum weights=$WEIGHTS ouput=map_sum
(map1 * weight1) + (map2 * weight2)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.