[STATSGRASS] Re: Change of Spatial Support

Rohan Sadler rsadler at cyllene.uwa.edu.au
Wed Apr 5 23:16:16 EDT 2006


#Hi Ulrich

#I forgot to comment on:
putRast6wrap<-function(y,x){
  x.bling<-GridTopology(c(0.002,0.002),c(0.004,0.004),c(dim(x)))
  x.bling2<-SpatialGridDataFrame(x.bling,AttributeList(list(c(t(x)[,nrow(x):1]))))
  writeRast6sp(x.bling2,y)
}
#  x is your data matrix in R
#  you control the grid topology with the assignment 
x.bling<-GridTopology(cell.centre.offset, cell.resolution ,matrix.dimension)
#  The current settings are to send a 250x250 matrix to an x,y region of 
dimension (0,1) x (0,1)
#  Again, I haven't tried the code but you may need to use g.region to 
change raster resolution once you are back in GRASS in order to view
#   Regards, Ro




----- Original Message ----- 
From: <statsgrass-request at grass.itc.it>
To: <statsgrass at grass.itc.it>
Sent: Wednesday, April 05, 2006 6:01 PM
Subject: statsgrass digest, Vol 1 #176 - 1 msg


> Send statsgrass mailing list submissions to
> statsgrass at grass.itc.it
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://grass.itc.it/mailman/listinfo/statsgrass
> or, via email, send a message with subject or body 'help' to
> statsgrass-request at grass.itc.it
>
> You can reach the person managing the list at
> statsgrass-admin at grass.itc.it
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of statsgrass digest..."
>
>
> Today's Topics:
>
>   1. Change of spatial support (Ulrich Leopold)
>
> --__--__--
>
> Message: 1
> Date: Wed, 5 Apr 2006 11:32:02 +0200 (CEST)
> From: "Ulrich Leopold" <uleopold at science.uva.nl>
> To: GRASSLIST at baylor.edu, statsgrass at grass.itc.it
> Reply-To: uleopold at science.uva.nl
> Subject: [STATSGRASS] Change of spatial support
>
> Dear list,
>
> I am trying to change the spatial support (grid size) of some floating 
> point
> raster maps from 250x250m to 1000x1000m. It's a kind of upscaling or more
> preciseley aggregation.
>
> All I need to do is to superimpose the larger grid on the smaller grid and
> compute the average and variance for the larger grid from the 4x4 250m 
> cells
> located within one 1000m cell.
>
> I recognise that this is still not possible in GRASS. The GRASS resampling
> methods for change of resolution, such as r.neigbors or g.region are not 
> an
> option as they do not provide a simple averaging method and the 
> aggregation
> error (variance).
>
> I thought maybe r.mapcalc or R with it's grass6 interface could be used. 
> But I
> do not know how to achieve it in terms of code. Any sugegstions?
>
> Ulrich
>
>
>
> --__--__--
>
> _______________________________________________
> statsgrass mailing list
> statsgrass at grass.itc.it
> http://grass.itc.it/mailman/listinfo/statsgrass
>
>
> End of statsgrass Digest
> 





More information about the grass-stats mailing list