Re: [R-sig-Geo] Vector to raster "zone" conversion...

2010-02-04 Thread Robert J. Hijmans
Hi Jonathan, Here is an example of how one could do this with 'raster': install.packages("packagename",repos="http://R-Forge.R-project.org";) library(raster) # Let p be a SpatialPolygons* object, e.g. p = getData('GADM', country='BEL', level=1) # create a RasterLayer with the same extent r = rast

[R-sig-Geo] Vector to raster "zone" conversion...

2010-02-03 Thread Jonathan Greenberg
Rsiggeo'ers: Given a vector file containing polygons and a raster file of the same projection, I would like to create raster "zones" based on the polygons -- e.g. I would like to rasterize the vector polygon at the resolution of the raster. I'm not seeing any obvious way to do this -- any