Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bounding_wkt

Generate Bounding Boxes


Description

bounding_wkt takes bounding boxes, in various formats, and turns them into WKT POLYGONs.

Usage

bounding_wkt(min_x, min_y, max_x, max_y, values = NULL)

Arguments

min_x

a numeric vector of the minimum value for x coordinates.

min_y

a numeric vector of the minimum value for y coordinates.

max_x

a numeric vector of the maximum value for x coordinates.

max_y

a numeric vector of the maximum value for y coordinates.

values

as an alternative to specifying the various values as vectors, a list of length-4 numeric vectors containing min and max x and y values, or just a single vector fitting that spec. NULL (meaning that the other parameters will be expected) by default.

Value

a character vector of WKT POLYGON objects

See Also

wkt_bounding(), to turn WKT objects of various types into a matrix or data.frame of bounding boxes.

Examples

# With individual columns
bounding_wkt(10, 12, 14, 16)

# With a list
bounding_wkt(values = list(c(10, 12, 14, 16)))

wellknown

Convert Between 'WKT' and 'GeoJSON'

v0.7.2
MIT + file LICENSE
Authors
Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>), Os Keyes [aut] (author of code in src/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.