bb_to_polygon: Convert a 4-element bounding box vector to a polygon simple...

View source: R/bb.R

bb_to_polygonR Documentation

Convert a 4-element bounding box vector to a polygon simple feature object.

Description

Alternatively, input a list of bounding boxes, each is transformed into one feature in a multi-feature object.

Usage

bb_to_polygon(
  bb = c(-72, -63, 39, 46),
  crs = ifelse(use_wkt("sf"), "epsg:4326", "+init=epsg:4326")
)

Arguments

bb

a 4-element numeric vector of left, right, bottom and top coordinates or a list of the same.

crs

character, the coordinate reference system

Value

a simple feature with a POLYGON or multiple feature object


BigelowLab/rasf documentation built on July 18, 2022, 10:19 p.m.