bounding_boxes | R Documentation |
From a vector of geometries identify different types of boundaries.
bounding_boxes(x)
bounding_rect(x)
minimum_rotated_rect(x)
convex_hull(x)
concave_hull(x, concavity)
extreme_coords(x)
bounding_box(x)
x |
an object of class |
concavity |
a value between 0 and 1 specifying the concavity of the convex hull |
Note that if you want a convex or concave hull over an entire vector of geometries
you must first union or combine them using either combine_geoms()
or union_geoms()
bounding_box()
returns a named vector of xmin, ymin, xmax, and ymax
bounding_boxes()
returns a list of bounding box numeric vectors for each geometry
bounding_rect()
returns an rs_POLYGON
of the bounding rectangle of each geometry
convex_hull()
returns an rs_POLYGON
of the convex hull for each geometry
concave_hull()
returns an rs_POLYGON
of the specified concavity for each geometry
extreme_coords()
returns the extreme coordinates of each geometry as a list where each element
is a named vector of xmin, ymin, xmax, and ymax where each element is a Point
geometry of the extreme value
minimum_rotated_rect()
returns the minimum rotated rectangle covering a geometry as an rs_POLYGON
lns <- geom_linestring(
1:20,
runif(20, -5, 5),
rep.int(1:5, 4)
)
bounding_box(lns)
bounding_boxes(lns)
minimum_rotated_rect(lns)
convex_hull(lns)
concave_hull(lns, 0.5)
extreme_coords(lns)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.