perimeter: Function to Return the Graphical Perimeter of an Object in...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Most classes in the sampSurf package have some kind of spatial representation that conforms to a class in sp (for polygons) or raster (for grids). This generic has been defined to return graphical polygon object that most nearly matches the perimeter. For some objects this means returning the bounding box for, perhaps, a collection of logs, or for a “Tract” object.

Usage

1
perimeter(object, ...)

Arguments

object

Signature object, which differs for each method.

...

See methods.

Details

The methods defined for this generic are described in perimeter-methods. The function is quite simple, and works essentially the same for each type of object. Again, some leeway in exactly what is returned is taken because we can have individual objects, collections, or grid rather than polygonal objects. In the latter two cases, the perimeter normally would be the minimal bounding box. For other objects in classes that have a well-defined perimeter, such as a downLog, or a circular plot, these are returned. One can always plot their bounding box separately with the help of link{bboxToPoly}.

Value

A "SpatialPolygons" object that can be plotted directly.

Author(s)

Jeffrey H. Gove

See Also

bbox

Examples

1
2
3
4
5
6
showMethods("perimeter")
dlogs = downLogs(15, xlim=c(0,20), ylim=c(0,20), buttDiams=c(25,35))
dlogs.perim = perimeter(dlogs)
plot(dlogs.perim, axes=TRUE)
plot(dlogs, add=TRUE)
bbox(dlogs.perim)

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