| gpc2owin {spatstat} | R Documentation |
Conversion between the different representations of a polygonal region in the packages spatstat and gpclib.
gpc2owin(x) owin2gpc(x)
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).
|
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.
An object of class "owin" in the spatstat
package (for gpc2owin) or an object of class
"gpc.poly" in the gpclib package (for owin2gpc).
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
data(letterR) R <- owin2gpc(letterR) L <- gpc2owin(R)