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

Dylan Beaudette 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.
>
> [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.

I get the same bad results with the original equations as with the new 
(correct) equations.



-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list