[GRASS-dev] r.resamp.stats method=sum artifacts

Dylan Beaudette dylan.beaudette at gmail.com
Wed Nov 8 14:37:39 EST 2006


On Friday 03 November 2006 14:51, Glynn Clements wrote:
> Dylan Beaudette wrote:
> > I have been noticing some odd edge effects when using r.resamp.stats
> > method=mode .... i.e. i am getting a "ring" of cells with 0-value around
> > the actual data. Within the "ring" the results appear to match those
> > obtained with an alternate raster-vector-starspan-raster approach to
> > doing the same operation.
> >
> > a graphical summary can be found here:
> > http://169.237.35.250/~dylan/temp/method_mode-test.png
>
> I wasn't making the source window large enough, with the result that
> edge cells were using garbage values from outside of the source
> buffer.
>
> [r.resamp.stats was derived from r.resamp.interp. The window-setting
> code was left untouched, but r.resamp.interp only needs source values
> corresponding to the destination cell's centre +/- 2 source cells,
> while r.resamp.stats needs source values for the whole of the
> destination cell's area.]
>
> I've committed the attached patch to CVS. Let me know if you still
> encounter problems.

Glynn, others:

The latest patch looks like a winner!

I have tested out the latest r.resamp.stats, comparing the results betwee:
1. starspan aggregation and r.resamp.stats
2. r.resamp.stats and default NN resampling

I have posted a detailed set of diagnostics here:
http://casoilresource.lawr.ucdavis.edu/drupal/node/275

It looks like r.resamp.stats is returning good results, which are very close 
to those returned by the starspan hack I had used before.

Cheers,

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




More information about the grass-dev mailing list