View source: R/geos-unary-geometry.R
geos_geometry_n | R Documentation |
Access child geometries
geos_geometry_n(geom, n)
geos_ring_n(geom, n)
geom |
A GEOS geometry vector |
n |
The (one-based) index of the child geometry |
A GEOS geometry vector along the recycled
length of geom
and i
.
multipoint <- "MULTIPOINT (0 0, 1 1, 2 2)"
geos_geometry_n(multipoint, seq_len(geos_num_geometries(multipoint)))
poly <- "POLYGON ((0 0, 0 1, 1 0, 0 0), (0.1 0.1, 0.1 0.2, 0.2 0.1, 0.1 0.1))"
geos_ring_n(poly, seq_len(geos_num_rings(poly)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.