gpc2owin

0th

Percentile

Convert Polygonal Region into Different Format

Conversion between the different representations of a polygonal region in the packages spatstat and gpclib.

Keywords
utilities, spatial
Usage
gpc2owin(x)
owin2gpc(x)
Arguments
x
Object representing a polygonal region. An object of class "owin" in the spatstat package (for owin2gpc) or an object of class "gpc.poly" in the gpclib package (for gpc2owin
Details

The packages spatstat and gpclib have slightly different internal formats for representing a polygonal region in the two-dimensional plane. In gpclib a polygonal region is an object of class "gpc.poly", while in spatstat it is an object of class "owin" and of type "polygonal". These two functions convert the two formats: owin2gpc converts an "owin" to a "gpc.poly", while gpc2owin does the reverse. Conversion of a "gpc.poly" to an "owin" can also be performed by calling as.owin.

Value

• An object of class "owin" in the spatstat package (for gpc2owin) or an object of class "gpc.poly" in the gpclib package (for owin2gpc).

as.owin

• gpc2owin
• owin2gpc
Examples
data(letterR)
if(spatstat.options("gpclib") && require(gpclib)) {
R <- owin2gpc(letterR)
L <- gpc2owin(R)
} else cat("gpclib is not available
")
Documentation reproduced from package spatstat, version 1.21-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.