Point2Bbox {CDSE}R Documentation

Create bounding box around a point

Description

Creates the bounding box (numeric vector of length four) around the input point(s).

Usage

Point2Bbox(x, y = NULL, size, crs = 4326)

Arguments

x

an sf, sfc, or SpatialPoints* object, a numeric indicating the longitude/easting of the point(s), or any input accepted by xy.coords

y

numeric, the latitude/northing of the point(s). Default: NULL

size

numeric indicating the size (in meters) of the bounding box to create

crs

coordinate reference system of the input (and the output): object of class crs, or input string for st_crs. Default: 4326 (WGS 84)

Details

The function assumes that the crs units are either degrees or meters, a warning is issued if not, and the result will probably be incorrect.

Value

A bounding box (numeric vector of length four), or a list of bounding boxes if the input is not scalar.

See Also

xy.coords, st_crs

Examples

## Not run: 
Point2Bbox(x = -73.96557, y = 40.78246, size = 1000, crs = 4326)

## End(Not run)

[Package CDSE version 0.2.0 Index]