[GRASS-user] integration of sample.c algorithms into r.resample

Glynn Clements glynn at gclements.plus.com
Mon Aug 14 03:46:24 EDT 2006


Dylan Beaudette wrote:

> When I use your new version of r.bilinear method=nearest on a CELL image, the 
> output is DCELL. While this can be fixed with r.mapcalc it shouldn't be too 
> hard to add this to the new module (?) .

It's easy enough to change, although I'm not sure whether it's the
right thing to do. It's arguable that the *only* difference between
the methods should be the way in which the result is calculated. Out
of the nine possible combinations of CELL/FCELL/DCELL input and
nearest/bilinear/bicubic methods, at least 8 of them will produce a
floating-point output map, so consistency would favour doing likewise
for the one remaining combination.

Whilst it would be possible to forcibly convert a CELL result to
FCELL/DCELL with r.mapcalc in cases where that was required, it might
not necessarily be obvious that a conversion is necessary until the
first time you actually use method=nearest and end up having to figure
out what happened.

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




More information about the grass-user mailing list