Description Usage Arguments Value References Examples
View source: R/bboxSpatialPolygon.R
Convert a bounding box to a SpatialPolygons object Bounding box is first created (in lat/lon) then projected if specified
1 | bboxSpatialPolygon(boundingbox, proj4stringFrom = NULL, proj4stringTo = NULL)
|
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 |
A SpatialPolygons object of the bounding box
https://gis.stackexchange.com/questions/46954/clip-spatial-object-to-bounding-box-in-r
1 2 3 4 5 | ## Not run:
boundingbox <- raster::extent(-180, +180, -50, +50)
bbSP <- bboxSpatialPolygon(boundingbox = boundingbox)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.