Skip to content
Prev 26741 / 29559 Next

how to create several polygons from a list of vertices

Maybe you can try this then?

polys <- SpatialPolygons(lapply(unique(vertices$cod),
                         function(x) {
                           Polygons(list(Polygon(vertices[vertices$cod ==
x, 1:2])), ID=x)
                         } ))
HTH,
Vijay.
On Tue, Aug 14, 2018 at 6:03 PM Antonio Silva <aolinto.lst at gmail.com> wrote: