coords | R Documentation |
Given an rsgeo
class object, extract the object's coordinates as a data frame.
Empty or missing geometries are ignored.
coords(x)
x |
an object of class |
A data.frame
with columns x
, y
. Additional columns are returned based
on the geometry type. Additional columns are:
id
line_id
: refers to the LineString
ID for rs_LINESTRING
, or the component LineString
in a MultiLineString
, or as the ring ID for a Polygon
.
multilinestring_id
polygon_id
multipolygon_id
pnt <- geom_point(3, 0.14)
mpnt <- geom_multipoint(1:10, 10:1)
ln <- geom_linestring(1:10, 10:1)
ply <- geom_polygon(c(0, 1, 1, 0, 0), c(0, 0, 1, 1, 0))
coords(pnt)
coords(mpnt)
coords(ln)
coords(union_geoms(rep(ln, 2)))
coords(ply)
coords(union_geoms(rep(ply, 2)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.