[STATSGRASS] moving-window analysis

G. Allegri giohappy at gmail.com
Wed Jun 6 15:00:03 EDT 2007


Sorry, I misunderstood your question. Maybe Edzer's advice could be a
good choice... if you don't need exactly a square window. In that case
you could use v.surf.idw too, setting recursively (with script) the
region to the size you need and moving it along the whole data region.
A question: you told you have a DEM as base data... what kind of
best-fit do you want to do? With point data against you're base
surface? A sort of interploetion with "trend"?

2007/6/6, Edzer J. Pebesma <e.pebesma at geo.uu.nl>:
> Well, package gstat provides linear regression within a local search
> neighbourhood defined either by distance (circular window) or by nr of
> nearest neighbours. Is that what you want?
>
> try:
>
> library(gstat)
> data(meuse)
> data(meuse.grid)
> coordinates(meuse)=~x+y
> gridded(meuse.grid) = ~x+y
> x = krige(log(zinc)~sqrt(dist),meuse,meuse.grid,maxdist=600)
> image(x)
> --
> Edzer
>
> Carlos "Guâno" Grohmann wrote:
> > Basic moving-window (ie, mean, stddev etc) is easy. The tricky
> > question is how to make a best-fit least squares inside that moving
> > window? I mean that it has to be a general function, so you can choose
> > the size of the window.
> >
> > Carlos
> >
> >
> >
> > On 6/6/07, G. Allegri <giohappy at gmail.com> wrote:
> >> In my experience the easier way to realize a moving-window analysys
> >> between rasters is to use r.mapcalc. I never did it in R. I knew that
> >> caTools package could do it someway... but I think using r.mapcla is
> >> more straightforward.
> >> Look at this nice article:
> >> http://casoilresource.lawr.ucdavis.edu/drupal/node/221
> >> --
> >> Giovanni
> >>
> >> 2007/6/6, Carlos Guâno Grohmann <carlos.grohmann at gmail.com>:
> >> > > What kind of data do you have?
> >> >
> >> > DEMs, some LiDAR, maybe
> >> >
> >> >
> >> >
> >> >
> >> > > 2007/6/6, Carlos Guâno Grohmann <carlos.grohmann at gmail.com>:
> >> > > > Hello. I was thinking what would be the best way to do a
> >> moving-window
> >> > > > analysis where the result is the deviation of values about a
> >> best-fit
> >> > > > plane?
> >> > > >
> >> > > > some modification to r.in.xyz?
> >> > > > r.mapcalc?
> >> > > > R? (which package, function..?)
> >> > > >
> >> > > > thanks
> >> > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > +-----------------------------------------------------------+
> >> > > >               Carlos Henrique Grohmann - Guano
> >> > > >   Visiting Researcher at Kingston University London - UK
> >> > > >   Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
> >> > > > Linux User #89721  - carlos dot grohmann at gmail dot com
> >> > > > +-----------------------------------------------------------+
> >> > > > _________________
> >> > > > "Good morning, doctors. I have taken the liberty of removing
> >> Windows
> >> > > > 95 from my hard drive."
> >> > > > --The winning entry in a "What were HAL's first words" contest
> >> judged
> >> > > > by 2001: A SPACE ODYSSEY creator Arthur C. Clarke
> >> > > >
> >> > > > _______________________________________________
> >> > > > statsgrass mailing list
> >> > > > statsgrass at grass.itc.it
> >> > > > http://grass.itc.it/mailman/listinfo/statsgrass
> >> > > >
> >> > >
> >> >
> >> >
> >> > --
> >> > +-----------------------------------------------------------+
> >> >               Carlos Henrique Grohmann - Guano
> >> >   Visiting Researcher at Kingston University London - UK
> >> >   Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
> >> > Linux User #89721  - carlos dot grohmann at gmail dot com
> >> > +-----------------------------------------------------------+
> >> > _________________
> >> > "Good morning, doctors. I have taken the liberty of removing Windows
> >> > 95 from my hard drive."
> >> > --The winning entry in a "What were HAL's first words" contest judged
> >> > by 2001: A SPACE ODYSSEY creator Arthur C. Clarke
> >> >
> >> > _______________________________________________
> >> > statsgrass mailing list
> >> > statsgrass at grass.itc.it
> >> > http://grass.itc.it/mailman/listinfo/statsgrass
> >> >
> >>
> >
> >
>
> _______________________________________________
> statsgrass mailing list
> statsgrass at grass.itc.it
> http://grass.itc.it/mailman/listinfo/statsgrass
>




More information about the grass-stats mailing list