Debian Codegraph @

man/SpatialLines-class.Rd

raw
1 \name{SpatialLines-class}
2 \docType{class}
3 \alias{SpatialLines-class}
4 % \alias{coordinates,SpatialLines-method}
5 \alias{[,SpatialLines-method}
6 \alias{plot,SpatialLines,missing-method}
7 \alias{summary,SpatialLines-method}
8 \alias{rbind.SpatialLines}
9 \alias{coerce,SpatialLines,SpatialPoints-method}
10 \alias{coerce,SpatialLines,SpatialPointsDataFrame-method}
11 \alias{coerce,Lines,SpatialPoints-method}
12 \alias{coerce,Lines,SpatialMultiPoints-method}
13 \alias{coerce,SpatialLines,SpatialMultiPoints-method}
14 \alias{coerce,deldir,SpatialLines-method}
15 \alias{row.names.SpatialLines}
16
17 \title{a class for spatial lines }
18 \description{ a class that holds spatial lines }
19 \section{Objects from the Class}{
20 hold a list of Lines objects; each Lines object holds a list
21 of Line (line) objects.
22 }
23 \section{Slots}{
24 \describe{
25 \item{\code{lines}:}{Object of class \code{"list"}; list members are all of
26 class \link{Lines-class}}
27 \item{\code{bbox}:}{Object of class \code{"matrix"}; see \link{Spatial-class} }
28 \item{\code{proj4string}:}{Object of class \code{"CRS"}; see \link{CRS-class}}
29 }
30 }
31 \section{Extends}{
32 Class \code{"Spatial"}, directly.
33 }
34 \section{Methods}{
35 \describe{
36 \item{[}{\code{signature(obj = "SpatialLines")}: select subset of (sets of) lines; NAs are not permitted in the row index}
37 \item{coordinates}{ value is a list of lists with matrices }
38 \item{plot}{\code{signature(x = "SpatialLines", y = "missing")}:
39 plot lines in SpatialLines object}
40 \item{lines}{\code{signature(x = "SpatialLines")}:
41 add lines in SpatialLines object to a plot }
42 \item{rbind}{\code{signature(object = "SpatialLines")}:
43 rbind-like method, see notes }
44 \item{summary}{\code{signature(object = "SpatialLines")}:
45 summarize object }
46 }
47 }
48 \note{
49 \code{rbind} calls the function \code{\link{SpatialLines}}, where it is
50 checked that all IDs are unique. If \code{rbind}-ing \code{SpatialLines} without
51 unique IDs, it is possible to set the argument \code{makeUniqueIDs = TRUE}, although
52 it is preferred to change these explicitly with \code{\link{spChFIDs}}.
53 }
54
55 \section{plot method arguments}{
56 The plot method for \dQuote{SpatialLines} objects takes the following arguments:
57 \describe{
58 \item{x}{object of class SpatialLines}
59 \item{xlim}{default NULL; the x limits (x1, x2) of the plot}
60 \item{ylim}{default NULL; the y limits of the plot}
61 \item{col}{default 1; default plotting color}
62 \item{lwd}{default 1; line width}
63 \item{lty}{default 1; line type}
64 \item{add}{default FALSE; add to existing plot}
65 \item{axes}{default FALSE; a logical value indicating whether both axes should be drawn }
66 \item{lend}{default 0; line end style}
67 \item{ljoin}{default 0; line join style}
68 \item{lmitre}{default 10; line mitre limit}
69 \item{...}{passed through}
70 \item{setParUsrBB}{set the \code{par} \dQuote{usr} bounding box, see note in \link{Spatial-class}}
71 }
72 }
73
74 \author{ Roger Bivand, Edzer Pebesma }
75
76 \seealso{
77 \link{Line-class}, \link{Lines-class}
78 }
79 \examples{
80 # from the sp vignette:
81 l1 = cbind(c(1,2,3),c(3,2,2))
82 rownames(l1) = letters[1:3]
83 l1a = cbind(l1[,1]+.05,l1[,2]+.05)
84 rownames(l1a) = letters[1:3]
85 l2 = cbind(c(1,2,3),c(1,1.5,1))
86 rownames(l2) = letters[1:3]
87 Sl1 = Line(l1)
88 Sl1a = Line(l1a)
89 Sl2 = Line(l2)
90 S1 = Lines(list(Sl1, Sl1a), ID="a")
91 S2 = Lines(list(Sl2), ID="b")
92 Sl = SpatialLines(list(S1,S2))
93 summary(Sl)
94 plot(Sl, col = c("red", "blue"))
95 }
96 \keyword{classes}