[GRASS-user] integration of sample.c algorithms into r.resample
Glynn Clements
glynn at gclements.plus.com
Wed Aug 16 04:26:59 EDT 2006
Dylan Beaudette wrote:
> > > note that the slope computed from the bicubic algorithm looks very
> > > similar to the NN slope map -- all computed via the new r.bilinear code.
> > > I was under the impression that the cubic output would be similar to the
> > > bilinear, but "smoother"...
> >
> > The bicubic interpolation formula was taken directly from
> > lib/gis/sample.c; it wouldn't surprise me if it was wrong.
[snip]
> > Try changing the relevant lines to:
[snip]
> Some further refinements:
>
> 1. when using your new equations, i get correct results when my input raster
> actually extends beyond the current region, and when I move from small res to
> large res : 10m to 100m.
Is it correct in that both:
a) the interpolated values are close to those obtained by other
methods, and
b) the slope artifacts present in the original version have gone?
?
> 2. when I try the same, but with a raster that _does not_ extend beyond the
> current region, i get odd results, from what looks like accessing an array
> with a bad index (?):
Is there any pattern to these errors?
Can you provide a (detailed) recipe which works with spearfish?
Do you get the same errors with the original equations? If only the
equations have changed, a bad index should affect both versions
equally.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list