[GRASS-user] Using r.quantile result with r.recode
pedrongvenancio at yahoo.com
Wed Apr 17 01:33:28 PDT 2013
> ----- Original Message -----
> From: Glynn Clements
> r.recode will treat boundary values as belonging to the upper range,
> e.g. in the above example, 6.0 will get recoded to 2.
So we can not use directly the result of r.quantile with -r flag in r.recode, right?
In the example, 6 should be recoded to 1, right?
Thank you very much!
Pedro Venâncio wrote:
> Thank you very much for your answer!
> My question lies precisely in the need to know if a quantile value
> which falls as the upper limit for one range and the lower limit of
> the next, should belong to the class anterior or posterior.
> For example, assuming that r.quantile (with -r flag) gives this result:
> the value 6 should belong to the first class or second?
r.recode will treat boundary values as belonging to the upper range,
e.g. in the above example, 6.0 will get recoded to 2.
This behaviour stems from Rast_fpreclass_get_cell_value() in
lib/raster/fpreclass.c, and isn't configurable (i.e. there's no way
that r.recode's behaviour could be modified without modifying the
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user