[GRASS-dev] Re: [GRASS-SVN] r33673 - in grass/trunk/raster: . r.statistics2

Glynn Clements glynn at gclements.plus.com
Fri Oct 17 13:26:23 EDT 2008


Glynn Clements wrote:

> > > Author: glynn
> > > Date: 2008-10-04 18:40:43 -0400 (Sat, 04 Oct 2008)
> > > New Revision: 33673
> > ...
> > > Added: grass/trunk/raster/r.statistics2/r.statistics2.html
> > > ===================================================================
> > > --- grass/trunk/raster/r.statistics2/r.statistics2.html                         (rev 0)
> > > +++ grass/trunk/raster/r.statistics2/r.statistics2.html 2008-10-04 22:40:43 UTC (rev 33673)
> > > @@ -0,0 +1,16 @@
> > > +<h2>DESCRIPTION</h2>
> > > +
> > > +<em>r.statistics2</em> is intended to be a partial replacement for
> > > +r.statistics, with support for floating-point cover maps at the
> > > +expense of not support quantiles.
> > 
> > ... could you elaborate on the limitations ("partial replacement")?
> > Any reason to keep r.statistics?
> 
> r.statistics2 lacks quantiles, mode and diversity, as these can't be
> calculated by accumulation (i.e. they require sorting and/or binning
> of the cover values).

> Computing the missing attributes (without loading the maps into
> memory) would require an approach similar to r.quantile, but with
> fewer bins (you need one set of bins for each base category) and thus
> more passes. That's really a job for a separate module, as its
> structure would be entirely different to r.statistics2.

I've now added such a module, r.statistics3 (I'll let someone else
think up better names for these modules). It's based upon r.quantile,
and as such only computes quantiles.

I have no idea how you would compute diversity or mode for FP data
(other than by sorting the entire set of values), or if this is even
meaningful (if the values are physical quantities, then in the absence
of rounding due to limited measuring precision, each value should
theoretically be unique).

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


More information about the grass-dev mailing list