[R-sig-Geo] Vectorize and buffer

Robert Hijmans r.hijmans at gmail.com
Wed Jan 26 04:39:18 CET 2011


> I see functions to rasterize in the raster package but nothing to
vectorize... 
> and certainly nothing to do buffer around polygons. 

raster has "rasterToPolygons" -- but it only works well for smallish rasters
(or when few cells have non NA values) because each cell with a value
becomes a polygon; that needs work. You can dissolve the with
unionSpatialPolygons in maptools (hopefully rgeos soon). I think adahabitat
has a buffer tool for lines. Perhaps you can create lines from your
polygons, make the buffer, combine with the original polygons, and dissolve
again? You could also consider doing the buffering on the raster (use
distance, and then reclassify). 
-- 
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Vectorize-and-buffer-tp5959999p5961511.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list