bounding_boxes {rsgeo} | R Documentation |
Compute Geometric Boundaries
Description
From a vector of geometries identify different types of boundaries.
Usage
bounding_boxes(x)
bounding_rect(x)
minimum_rotated_rect(x)
convex_hull(x)
concave_hull(x, concavity)
extreme_coords(x)
bounding_box(x)
Arguments
x |
an object of class |
concavity |
a value between 0 and 1 specifying the concavity of the convex hull |
Details
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()
Value
-
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 anrs_POLYGON
of the bounding rectangle of each geometry -
convex_hull()
returns anrs_POLYGON
of the convex hull for each geometry -
concave_hull()
returns anrs_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 aPoint
geometry of the extreme value -
minimum_rotated_rect()
returns the minimum rotated rectangle covering a geometry as anrs_POLYGON
Examples
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)