bboxToPoly: Function to Convert a Valid "bbox" to a "SpatialPolygons"...

Description Usage Arguments Details Value Author(s) Examples

View source: R/bboxToPoly.R

Description

This converts a valid bbox, or object with a bbox specification in the sampSurf package, if available, into a spatial polygon object of class "SpatialPolygons".

Usage

1
bboxToPoly(object, ...)

Arguments

object

Some object with a valid bbox slot from one of the classes in sampSurf, or a valid bbox matrix.

...

Black hole for everything else.

Details

One can plot the result of this function to quickly get an idea of the overall spatial extent of an object. In many cases the result from this object is the same as that returned by perimeter, but not always; e.g., see the example below.

Value

A "SpatialPolygons" object that can be plotted directly.

Author(s)

Jeffrey H. Gove

Examples

1
2
3
4
cp = circularPlot(10, center=c(x=20,y=20))
cp.perim = perimeter(cp)
plot(cp.perim, axes=TRUE, lty='dashed')              #the perimeter of the plot
plot(bboxToPoly(cp.perim), add=TRUE, border='blue')  #the bounding box

Example output

Loading required package: sp
Loading required package: raster
Loading required package: boot
sampSurf version 0.7-4 (2017-08-24)

sampSurf documentation built on March 5, 2021, 3:01 p.m.