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

Dylan Beaudette dylan.beaudette at gmail.com
Mon Aug 14 11:23:04 EDT 2006


On 8/14/06, Maciej Sieczka <tutey at o2.pl> wrote:
> Glynn Clements napisa?(a):
> > Dylan Beaudette wrote:
> >
> >> How about this:
> >> 1. keep r.resample and update the documentation accordinly.
> >> 2. toss r.bilinear, possibly leave a note somewhere in the docs
> >
> > Or replace it with a script which calls "r.interpolate method=bilinear".
> >
> >> 3. create a new module 'r.resample.3' (?) for the three methods that it would
> >> do? or 'r.interpolate' (?)
> >
> > I prefer r.interpolate.
>
> If I may not agree - *inter* suggests this module will be able to fill
> null gaps. This is not the case. It will even make the opposite - make
> the gaps bigger in the output for method= bilinear and bicubic, if nulls
> are present in the input.

This would normally be the case, but the conept of NULL alters the
operational definition of what interpolation is. Either way there is a
potential for misunderstanding. Indeed the methods involved are
traditional _interpolation_ algorithms. As such, they might not be as
useful for moving from small grid sizes to larger grid sized
(aggregating).

> This module is for re-sampling and r.resample is the only good name I
> can think of currently.
>

I also like the name r.resample, as it is a bit more general. perhaps
r.resample could be a script that calls r.interpolate / r.aggregate
based on the shift in resolution.

> IMHO: drop r.bilinear, replace r.resample. To provide compatibility with
> old r.resample (that performed nearest neighbor only) set the default
> method=nearest. This will keep things simple and backward compatible.

This also works, but I think that we will need to address the
aggregation problem soon.

> If it is necessary to mantain r.bilinear compatibilty, make it a script
> that calls r.resample method=bilinear.
>
> What do you think?
>
> Maciek
>

We are getting closer... !

Cheers,

Dylan




More information about the grass-user mailing list