[GRASS-user] Using r.resamp.stats for null values

Glynn Clements glynn at gclements.plus.com
Wed Jun 22 07:40:29 EDT 2011


katrin eggert wrote:

> I just one to confirm one thing. If I'm using r.resamp.stats with
> *mode *option.
> If the most frequent value is a null, will i have a null value in the ouput?

No.

With the -n option, the output is null if any input cell is null. 
Without the -n option, most aggregates (including "mode") ignore null
cells; you'll only get a null result if all input cells are null.

IIRC, the only reason that nulls are retained in the array passed to
the aggregate functions is that some of them (e.g. interspersion,
regression) consider the cell's position within the array, and having
the caller discard nulls beforehand would interfere with this.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list