[GRASS-dev] r.univar: allow multiple rasters to be processed

Glynn Clements glynn at gclements.plus.com
Sun Apr 6 22:57:43 EDT 2008


Hamish wrote:

> > > Is there some fundamental reason why r.univar has separate cases for
> > > CELL/FCELL/DCELL types, rather than just working in DCELL throughout?
> >
> > On 2008-02-21 Hamish wrote:
> > I can't remember with any certainty why I did it that way; it's been
> > like that since the first CVS checkin.
> 
> 
> replying to an old thread:
> 
> It looks like I reused code/ideas from r.example which does it that way.

Right.

We should consider whether that idiom is appropriate for an example
module. Most modules only use a single data type (typically CELL if
the functionality is only meaningful for integers, or DCELL
otherwise).

Many of the r.mapcalc functions have three versions, but the FCELL
cases are mostly pointless (most of them actually use double then
truncate the result).

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


More information about the grass-dev mailing list