Learn R Programming

rgeos (version 0.3-22)

new-generics: Generics/Methods for polygon objects

Description

Some generic functions and methods for polygon objects

Usage

append.poly(x, y) area.poly(object, ...) get.pts(object) get.bbox(x) scale.poly(x, ...) tristrip(x) triangulate(x)

Arguments

x,object
A polygon object
y
A polygon object
...
Other arguments passed to methods

Methods

Details

The result of tristrip(x) is a list of two-column matrices. Each matrix is a tristrip, i.e. the rows are vertices of triangles, with each overlapping triple of rows corresponding to a separate triangle.

The result of triangulate(x) is a single two-column matrix. The rows are vertices of triangles, taken in non-overlapping triples.

See Also

"gpc.poly" class documentation.

Examples

Run this code
holepoly <- read.polyfile(system.file("poly-ex-gpc/hole-poly.txt",
 package ="rgeos"), nohole = FALSE)
area.poly(holepoly)
stopifnot(area.poly(holepoly) == 8)

Run the code above in your browser using DataLab