PolyData Objects
A PolyData object comprises a data frame that summarises information
for each polyline/polygon in a PolySet; each PolyData record is defined by
a unique PID or (PID, SID combination).
PBSmapping functions that expect PolyData will accept properly formatted data frames in their place (see 'Details').
as.PolyData attempts to coerce a data frame to an object with
class PolyData.
is.PolyData returns TRUE if its argument is of class
PolyData.
as.PolyData(x, projection = NULL, zone = NULL) is.PolyData(x, fullValidation = TRUE)
x |
data frame to be coerced or tested. |
projection |
optional |
zone |
optional |
fullValidation |
Boolean value; if |
We define PolyData as a data frame with a first column named PID
and (optionally) a second column named SID. Unlike a
PolySet, where each contour has many records corresponding
to the vertices, a PolyData object must have only one record for each
PID or each (PID, SID) combination. Conceptually,
this object associates data with contours, where the data correspond to
additional fields in the data frame. The R language conveniently
allows data frames to contain fields of various atomic modes
("logical", "numeric", "complex",
"character", and "null"). For example, PolyData with the
fields (PID, PName) might assign character names to a set
of primary polygons. Additionally, if fields X and Y exist
(perhaps representing locations for placing labels), consider adding
attributes zone and projection. Inserting the string
"PolyData" as the class attribute's first element alters the
behaviour of some functions, including print (if
PBSprint is TRUE) and summary.
lty - line type in drawing the border and/or shading
lines;
col - line or fill colour;
border - border colour;
density - density of shading lines;
angle - angle of shading lines.
When drawing polylines (as opposed to closed polygons), only lty
and col have meaning.
The as.PolyData method returns an object with classes
"PolyData" and "data.frame", in that order.
Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2015-04-23
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.