bboxToPoly {sampSurf} | R Documentation |
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
".
bboxToPoly(object, ...)
object |
Some object with a valid |
... |
Black hole for everything else. |
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.
A "SpatialPolygons
" object that can be plotted directly.
Jeffrey H. Gove
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