[GRASS-user] Re: spgrass6

Dylan Beaudette debeaudette at ucdavis.edu
Tue Mar 6 16:32:43 EST 2012


On Wednesday, February 22, 2012, Paolo Cavallini wrote:
> Il 22/02/2012 15:54, Roger Bivand ha scritto:
> > Using the improved raster graphics handling for square cells with image()
> > rather than spplot() and useRaster=TRUE - equivalent to
> > image.SpatialGridDataFrame() and useRasterImage=TRUE with the same matrix
> > takes 1.2 seconds on x11/cairo. You didn't say which version of R you are
> > using - the raster graphics facilities have been improved recently.
> 2.14.1-1 on Debian testing.
> > Did you try using image() instead of spplot() if your cells are square, 
and
> > if rasterImage() is available in your version of R?
> Yes, image() is resonably fast, but misses automatic legend, etc.
> Thanks a lot for your reply.
> 
> -- 
> Paolo Cavallini
> See: http://www.faunalia.it/pc
> 
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 

Check out the plot() function from the raster package, or the related 
rasterViz (?) package. They have some neat stuff in there. 

Roger already mentioned this, but I'll add a little more. Now that we have 
powerful computers and nice packages like spgrass6 it is very simple to load 
large raster files into R without much effort. However, just because we can 
fit a linear model on that massive stack of pixels doesn't mean that one 
should. This is even more important with regard to plotting functions. I have 
found that coarsening the region resolution a bit before loading in raster 
that only need to be plotted helps considerably. 

If you really must work with stacks of large grids, the best approach I have 
found is the raster package.

Cheers,
Dylan


-- 
Dylan E. Beaudette
USDA-NRCS Soil Scientist
California Soil Resource Lab
http://casoilresource.lawr.ucdavis.edu/


More information about the grass-user mailing list