new-generics {gpclib} | R Documentation |
Some generic functions and methods for polygon objects
append.poly(x, y) area.poly(object, ...) get.pts(object) get.bbox(x) scale.poly(x, ...)
x,object |
A polygon object |
y |
A polygon object |
... |
Other arguments passed to methods |
signature(x = "gpc.poly", y =
"gpc.poly")
: Combine all contours of two "gpc.poly"
objects and return the combined polygon as a "gpc.poly"
object.signature(object = "gpc.poly")
: Compute and
return the sum of the areas of all contours in a "gpc.poly"
object.signature(x = "gpc.poly")
: Scale (divide)
the x and y coordinates of a "gpc.poly"
object by the
amount xscale
and yscale
, respectively. Return a
scaled "gpc.poly"
object.signature(object = "gpc.poly")
: Return the
list of x and y coordinates of the vertices of a "gpc.poly"
object.signature(x = "gpc.poly")
: Return the
bounding box for a "gpc.poly"
object.Roger D. Peng; GPC Library by Alan Murta
"gpc.poly"
class documentation.
holepoly <- read.polyfile(system.file("poly-ex/hole-poly.txt", package = "gpclib"), nohole = FALSE) area.poly(holepoly) stopifnot(area.poly(holepoly) == 8)