Re: [R-sig-Geo] How to write functions with mutiple large raster

2013-05-08 Thread Nagle, Nicholas
out<-stack(list.files(pattern='*.tiff$) filename<-rasterTmpFile() out<-writeStart(out,filename,overwrite=TRUE) bs<-blockSize(out) pb<-pbCreate(bs$n) for (i in 1:bs$n){ v<-getValues(out,row=bs$row[i],nrows=bs$nrows[i]) s<-t(sapply(apply(v,1,low

Re: [R-sig-Geo] How to write functions with mutiple large raster

2013-05-08 Thread Nagle, Nicholas
ution. My solution in this moment is as follow: 1.- Create the 'rasterStack' 2.- Save with 'writeRaster(rasterStack,filename) 3.- Open it with "brick(filenanme)" 4.- Use the function writeStart Thats is the better way or exist another option? 2013/5/8 Nagle, Nicholas mai

Re: [R-sig-Geo] How to write functions with mutiple large raster

2013-05-08 Thread Nagle, Nicholas
Dear Francisco, I am working with the same time series of MOD09 data, but I leave it as a stack, rather than create the brick. Why do you need it as a brick? The problem with brick is that it needs the data to be in one file. That's a big file in this instance (Tb scale?). And, since you d

Re: [R-sig-Geo] Question about space-time analysis routines

2012-11-02 Thread Nagle, Nicholas
Corey, You might also look at Simon Wood's mgcv package. It is a general purpose Generalized Additive Model package. There is a way to specify a Conditional Autoregressive Model in space. And you can interact this with temporal autocorrelation (or equivalently, with temporal splines). And,

Re: [R-sig-Geo] Area-weighted average of ncdf files

2012-01-17 Thread Nagle, Nicholas
Hi Trent - I've had some success doing raster-to-vector conversions with GRASS and the spgrass6 package. But without the fractional allocation of cells that you need here. Quick and dirty, you might increase the resolution of the raster so that the area of cells exactly on the boundary is neg

Re: [R-sig-Geo] Overlaying rasters in spplot

2011-11-29 Thread Nagle, Nicholas
Hi Chris - I don't know how to do what you want with spplot, but I've done it with ggplot. Overlays and colors are more intuitive to me in ggplot. Maybe this will help? I recently had to plot data from the NLCD. It has a colortable in the metadata, and people are used to seeing the data with

[R-sig-Geo] DEM interpolation with Delaunay triangulation

2011-11-23 Thread Nagle, Nicholas
For the first part of your question, interpolation: I've never used it, but the 'tripack' package seems to do most of what you want. There is a function tri.find() that returns the three points of the TIN. From there, a linear interpolation shouldn't be too difficult. For the second part, re