lawn_square: Calculate a square bounding box

Description Usage Arguments Value See Also Examples

View source: R/square.R

Description

Takes a bounding box and calculates the minimum square bounding box that would contain the input.

Usage

1

Arguments

bbox

A bounding box.

Value

A square surrounding bbox, numeric vector of length four.

See Also

Other measurements: lawn_along(), lawn_area(), lawn_bbox_polygon(), 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()

Examples

1
2
3
4
5
6
7
8
bbox <- c(-20, -20, -15, 0)
lawn_square(bbox)
## Not run: 
sq <- lawn_square(bbox)
lawn_featurecollection(list(lawn_bbox_polygon(bbox),
  lawn_bbox_polygon(sq))) %>% view

## End(Not run)

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