[GRASS-user] How to implement this kind of operation?

DavidRA theboss777 at gmail.com
Mon Jul 2 02:30:00 PDT 2012


It is a version of the ordered weighted averaging, with two kind of weights:
one associated with the raster layer and another one that depends on the
order of the cell. Look, this is how I do it with r.mapcalc when there are
just 2 raster layers:



where "w"i are the weights of each layer and "zi" the weights of order. The
process is simple: for each position, if any raster has NODATA, the output
raster will have a NODATA in that position. Else, if the cell of the first
raster has a bigger value than the second, we assign z1 and z2 and calculate
the average. If it is smaller, we assign z2 and z1 and do the calculation.

What I need to do now is the same, but with many rasters. I can't use
r.mapcacl bacause the number of "IF" sentences would be huge.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-implement-this-kind-of-operation-tp4984790p4985264.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list