Convert a bounding box to a SpatialPolygons object Bounding box is first created (in lat/lon) then projected if specified
Source:R/bboxSpatialPolygon.R
bboxSpatialPolygon.Rd
Convert a bounding box to a SpatialPolygons object Bounding box is first created (in lat/lon) then projected if specified
Arguments
- boundingbox
Bounding box: a 2x2 numerical matrix of lat/lon coordinates
- proj4stringFrom
Projection string for the current boundingbox coordinates (defaults to lat/lon, WGS84)
- proj4stringTo
Projection string, or NULL to not project
Examples
if (FALSE) {
boundingbox <- terra::ext(-180, +180, -50, +50)
bbSP <- bboxSpatialPolygon(boundingbox = boundingbox)
}