read.polyfile(filename, nohole = TRUE)
write.polyfile(poly, filename = "GPCpoly.txt")"gpc.poly"nohole is TRUE (the default) read.polyfile
returns an object of class "gpc.poly.nohole". This object has
the hole flag set to FALSE for all contours. If nohole is
FALSE, then an object of class "gpc.poly" is
returned.
write.polyfile does not return anything useful.2 4 1.0 1.0 1.0 2.0 3.4 3.21 10 11.2 3 21.0 11.2 22.3 99.2 4.5 5.4 The vertices of the polygon can be ordered either clockwise or counter-clockwise.
If a polygon has contours which are holes, then the format is slightly different. Basically, a flag is set to indicate that a particular contour is a hole. The format is
2 3 1 4.0 4.0 6.0 5.0 5.0 6.0 4 0 2.0 1.0 8.0 2.0 7.0 9.0 1.0 7.0
gpc.poly-class, gpc.poly.nohole-class