thresholding in GRASS
Lesley-Ann Dupigny
dupigny at felix.geog.mcgill.ca
Wed Aug 24 15:37:34 EDT 1994
Hello GRASS Users
A few months ago, I had a question about thresholding in GRASS using
r.mapcalc and I received several replies of the form
r.mapcalc output = if (input >= var1 && input <= var2, (a-input)/b,0)
I would now like to separate the input into 2 distinct ranges and apply 2
formulae, e.g.
for input lying between 110 and 140, apply a + bx
for input lying between 160 and 200 apply c + dx
I thought of generating two layers with r.mapcalc, one for each of the
conditions above, and then combining them with r.combine. Do you know if
it is possible to put both conditions into one r.mapcalc statement,
thereby saving that intermediary step?
Looking forward to any suggestion.
Cheers
Lesley-Ann Dupigny.
More information about the grass-user
mailing list