[GRASS-dev] r.univar: allow multiple rasters to be processed
Glynn Clements
glynn at gclements.plus.com
Thu Feb 21 22:49:36 EST 2008
Ivan Shmakov wrote:
> > Is there some fundamental reason why r.univar has separate cases for
> > CELL/FCELL/DCELL types, rather than just working in DCELL throughout?
>
> > Most of the time, there's no value to having separate CELL/FCELL
> > cases. There's hardly ever a reason to have a separate FCELL case,
> > and a separate CELL case is only really useful if you specifically
> > need integer-specific operations (e.g. integer division, bitwise
> > operations etc).
>
> > I'm aware that r.univar was already like this, but if there isn't a
> > valid reason, this would be a good time to simplify it.
>
> I don't know for sure, but apparently the distinction is only
> effective when gathering extended statistics (percentiles,
> median.)
>
> Since the extended statistics code temporarily stores all the
> values from the raster(s) being processed, using native types
> may lead to reduced memory usage and processing time.
I doubt that it will make much difference regarding overall processing
time.
So far as memory usage is concerned: if we think that people might
want to compute quantiles on data sets which are large enough that we
need to worry about memory consumption, we should probably be looking
for a more efficient algorithm. Sorting the entire data set then
pulling out quantiles is less than ideal if you're dealing with that
much data.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list