[GRASSLIST:4589] Re: aggregate a higher resolution to a lower resolution

Gordon Keith gordon.keith at csiro.au
Thu Sep 26 19:17:45 EDT 2002


On Thu, 26 Sep 2002 18:45, Glynn Clements wrote:
> Ulrich is looking for something which maps multiple input cells to a
> single output cell. Similar to r.resample/r.resamp.rst, but using an
> average rather than nearest-neighbour (r.resample, i.e. the automatic
> resampling built into the libgis raster functions) or spline
> interpolation (r.resamp.rst).
>
> Unfortunately, this isn't straightforward (or efficient) to
> implement, as libgis' raster handling assumes a common region and
> resolution (i.e. cellhd) for all input and output maps.
>
> The easiest approach would be r.neighbors to perform the average,
> followed by g.region/r.resample to downsample the data. *Except* that
> r.neighbors only allows odd-sized windows (so that there is an
> unambiguous "centre" cell).


How about:
r.to.sites
g.region
s.windavg (or the new s.cellstats)
s.to.rast

Regards
Gordon

-- 

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

This is what love is:  it is not that we have loved God,
but that he loved us and sent his Son to be th means by which our sins 
are forgiven.
  -- 1 John 4:10



More information about the grass-user mailing list