[GRASS-user] integration of sample.c algorithms into r.resample
dylan.beaudette at gmail.com
Wed Aug 16 14:10:52 EDT 2006
On Wednesday 16 August 2006 01:26, Glynn Clements wrote:
> 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.
> > > Try changing the relevant lines to:
> > 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
I get the same bad results with the original equations as with the new
Soils and Biogeochemistry Graduate Group
University of California at Davis
More information about the grass-user