[R-sig-Geo] raster to polygons

Roger Bivand Roger.Bivand at nhh.no
Wed May 31 09:31:09 CEST 2006


On Wed, 31 May 2006, didier leibovici wrote:

> Hi,
> I can't find a function allowing to transform a raster grid to a polygon 
> 'shapefile' (sp class or other)

Could you look in the sp package at:

?as.SpatialPolygons.GridTopology

and see if it does what you need (for coarse grids)? It only makes 
rectangular polygons, if you need to merge polygons based on an attribute 
value, that can be done too, quite inefficiently, but it works.

Roger

> thanks
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list