File: lintess.Rd

package info (click to toggle)
r-cran-spatstat.linnet 3.2-5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,664 kB
  • sloc: ansic: 2,107; makefile: 32; sh: 13
file content (107 lines) | stat: -rw-r--r-- 3,446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
\name{lintess}
\alias{lintess}
\title{
  Tessellation on a Linear Network
}
\description{
  Create a tessellation on a linear network.
}
\usage{
lintess(L, df, marks=NULL)
}
\arguments{
  \item{L}{
    Linear network (object of class \code{"linnet"}).
  }
  \item{df}{
    Data frame of local coordinates for the pieces that make up the 
    tiles of the tessellation. See Details.
  }
  \item{marks}{
    Vector or data frame of 
    marks associated with the tiles of the tessellation.
  }
}
\details{
  A tessellation on a linear network \code{L} is a partition of the
  network into non-overlapping pieces (tiles). Each tile consists of one
  or more line segments which are subsets of the line segments making up
  the network. A tile can consist of several disjoint pieces.
  
  The data frame \code{df} should have columns named
  \code{seg}, \code{t0}, \code{t1} and \code{tile}.
  Any additional columns will be ignored.

  Each row of the data frame specifies one sub-segment of the network
  and allocates it to a particular tile.
  
  The \code{seg} column specifies which line segment of the network
  contains the sub-segment. Values of \code{seg} are integer indices
  for the segments in \code{as.psp(L)}.

  The \code{t0} and \code{t1} columns specify the start and end points
  of the sub-segment. They should be numeric values between 0 and 1
  inclusive, where the values 0 and 1 representing the network vertices
  that are joined by this network segment.

  The \code{tile} column specifies which tile of the tessellation
  includes this sub-segment. It will be coerced to a factor and its
  levels will be the names of the tiles.

  If \code{df} is missing or \code{NULL}, the result is a tessellation
  with only one tile, consisting of the entire network \code{L}.

  Additional data called \emph{marks} may be associated with
  each tile of the tessellation. The argument \code{marks} should be
  a vector with one entry for each tile (that is, one entry for each
  level of \code{df$tile}) or a data frame with one row for each tile.
  In general \code{df} and \code{marks} will have different numbers of rows.
}
\value{
  An object of class \code{"lintess"}.
  There are methods for \code{print}, \code{plot} and
  \code{summary} for this object.
}
\author{
  \adrian and Greg McSwiggan.
}
\seealso{
  \code{\link{linnet}} for linear networks.

  \code{\link{plot.lintess}} for plotting.

  \code{\link{divide.linnet}} to make a tessellation demarcated by
  given points.

  \code{\link{chop.linnet}} to make a tessellation demarcated by
  infinite lines.
  
  \code{\link{lineardirichlet}} to create the Dirichlet-Voronoi
  tessellation from a point pattern on a linear network.
  
  \code{\link{as.linfun.lintess}}, \code{\link{as.linnet.lintess}} and
  \code{\link{as.linim}} to convert to other classes.

  \code{\link{tile.lengths}} to compute the length of each tile
  in the tessellation.
  
  The undocumented methods \code{Window.lintess} and
  \code{as.owin.lintess} extract the spatial window.
}
\examples{
   # tessellation consisting of one tile for each existing segment
   ns <- nsegments(simplenet)
   df <- data.frame(seg=1:ns, t0=0, t1=1, tile=letters[1:ns])
   u <- lintess(simplenet, df)
   u
   plot(u)
   S <- as.psp(simplenet)
   marks(u) <- data.frame(len=lengths_psp(S), ang=angles.psp(S))
   u
   plot(u)
}
\keyword{spatial}
\keyword{datagen}

\concept{Tessellation}
\concept{Linear network}