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

Hi there

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?
Thank you
Kat

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@gclements.plus.com>

Just one question: is it possible to “count” number of cells with a certain value (or nulls) from one scale that are being used to calculate each value pixel of the target scale?
Thanks

2011/6/22 Glynn Clements <glynn@gclements.plus.com>

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@gclements.plus.com>

katrin eggert wrote:

Just one question: is it possible to "count" number of cells with a certain
value (or nulls) from one scale that are being used to calculate each value
pixel of the target scale?

Not directly, but you can create a binary (0/1 or null/1) version of
the input map then use "r.resamp.stats method=sum ..." on that.

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