[GRASS-dev] v.cellstats script [+new module: r.out.xyz]

Martin Wegmann wegmann at biozentrum.uni-wuerzburg.de
Thu Nov 23 06:03:58 EST 2006

Hello Glynn,

On Tuesday 21 November 2006 22:41, you wrote:
> Martin Wegmann wrote:
> > > > how does this script's function differ from the new r.resamp.stats
> > > > module?
> > >
> > > yes it looks the same and it's much faster, but it variance is missing.
> >
> > I added in the main.c file of r.resamp.stats these lines to be able to
> > calculate variance and stddev:
> >
> > [..]
> > 	{c_sum,    w_sum,    "sum",       "sum of values"},
> > 	{c_var,    w_var,    "variance",  "variance value"},
> > 	{c_stddev, w_stddev, "stddev",    "standard deviation"},
> > 	{NULL,     NULL,        NULL}
> > [...]
> >
> > it seems to work so far - if that is ok, shall I submit it to cvs?
> What's the point?
> BTW, sum is already there. I added it after it was pointed out that it
> might be useful: if the values in the source map are the number of
> "items" in each source cell, then the sum aggregate makes sense, as
> the result will be the number of "items" in the output cell.
> OTOH, I don't really see the point of computing stddev/variance over
> the values which happen to fall into a given output cell. That's why I
> chose to omit them (and initially to omit sum).

we wanted to know how much data is lost in a low res. map compared to a high 
res. map hence we are interested in the variance presented inside one low 
res. pixel of various high res. pixel.

well stddev can be omitted but so far I have some use for variance - but I can 
keep my modified local version and work with it, thats fine for me. ,-)

cheers Martin

> [The original version only included the aggregates which produced a
> result which was "representative" of the input values (i.e. those
> where, if the input cells all had the same value, the output would be
> that value).]

More information about the grass-dev mailing list