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

Dylan Beaudette dylan.beaudette at gmail.com
Tue Oct 31 14:17:58 EST 2006


On Monday 30 October 2006 20:00, Hamish wrote:
> Glynn Clements wrote:
> > Hamish wrote:
> > > with "r.resamp.stats method=sum", I'm seeing banding. Is this
> > > expected or a case of it including points falling on the northern
> > > and eastern bounds? so the same input cell gets counted for multiple
> > > output cells? i.e. is it doing ( <= x <= , <= y <= ) instead of ( <=
> > > x < , <= y < ) ?
> >
> > Unless the destination resolution is an integer multiple of the source
> > resolution, the total number of source cells used for each destination
> > cell will vary.
> >
> > E.g. if the source resolution is 10m, and the destination resolution
> > is 25m, then the output cells will be based upon grids of 2x2, 2x3,
> > 3x2 and 3x3 source cells, in equal proportions.
>
> ..
>
> > The banding effect should go away if you use the -w switch. That will
> > cause the aggregates to use proportional fractions of each source
> > cell's value, rather than attributing the entire source cell to
> > whichever destination cell contains the source cell's centre.
>
> Yes, adding the -w flag did the trick now it looks good. Both slope and
> curvature derivatives are perfectly clean as well.
>
>
> thanks,
> Hamish
>
> ps - I've added metadata (hist/) support to r.resamp.stats & .interp,
> and they now copy over the source map's color table, for all cases but
> method=sum.

Great job Gylnn on implementing this module. I lost track of its progress 
while writting up a recent proposal for a very similar topic. I can confirm 
the behavior that Hamish has reported. I'll post back with a comparison 
between the output from the new module, and the vector/raster hack that I had 
used in the past: http://casoilresource.lawr.ucdavis.edu/drupal/node/275

Cheers,

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




More information about the grass-dev mailing list