This function creates a bounding box from either cardinal coordinates (north, south, east and west) or center coordinates and dimensions (center longitude and latitude, and size of width and height).
Usage
create_bbox(
north = NULL,
south = NULL,
east = NULL,
west = NULL,
center_lon = NULL,
center_lat = NULL,
width = NULL,
height = NULL
)
Examples
# Create a bounding box from cardinal coordinates
create_bbox(
north = 35.1899,
south = 35.1399,
east = 136.9524,
west = 136.8524
)
#> min max
#> x 136.8524 136.9524
#> y 35.1399 35.1899
# Create a bounding box from center coordinates and dimensions
create_bbox(
center_lon = 136.9024,
center_lat = 35.1649,
width = 0.10,
height = 0.05
)
#> min max
#> x 136.8524 136.9524
#> y 35.1399 35.1899