lawn_bbox_polygon: Make a polygon from a bounding box

Description Usage Arguments Value See Also Examples

View source: R/bbox_polygon.R

Description

Takes a bbox and returns an equivalent polygon data-Polygon.

Usage

1

Arguments

bbox

An array of bounding box coordinates in the form: [xLow, yLow, xHigh, yHigh].

Value

A data-Polygon representation of the bounding box.

See Also

Other measurements: lawn_along(), lawn_area(), lawn_bbox(), lawn_bearing(), lawn_center_of_mass(), lawn_center(), lawn_centroid(), lawn_destination(), lawn_distance(), lawn_envelope(), lawn_extent(), lawn_line_distance(), lawn_midpoint(), lawn_point_on_feature(), lawn_pt2line_distance(), lawn_square()

Examples

1
2
3
4
5
6
7
bbox <- c(0, 0, 10, 10)
lawn_bbox_polygon(bbox)
## Not run: 
lawn_bbox_polygon(bbox) %>% view
lawn_bbox_polygon(c(1, 3, 5, 50)) %>% view

## End(Not run)

Example output

<Polygon>
  Bounding box: 0.0 0.0 10.0 10.0
  No. points: 5
  Properties: NULL

lawn documentation built on Jan. 6, 2021, 5:07 p.m.