|
| 1 | +\name{highways} |
| 2 | +\alias{highways} |
| 3 | +\title{ |
| 4 | + Identify Uninterrupted Highways in a Linear Network |
| 5 | +} |
| 6 | +\description{ |
| 7 | + Given a linear network, find the highways. |
| 8 | + A highway is a set of connected edges which do not pass through |
| 9 | + any forks in the network. |
| 10 | +} |
| 11 | +\usage{ |
| 12 | +highways(X, what = c("tessellation", "labels")) |
| 13 | +} |
| 14 | +\arguments{ |
| 15 | + \item{X}{ |
| 16 | + A linear network (object of class \code{"linnet"}). |
| 17 | + } |
| 18 | + \item{what}{ |
| 19 | + String (partially matched) specifying the kind of result. |
| 20 | + } |
| 21 | +} |
| 22 | +\details{ |
| 23 | + A \sQuote{highway} in a network is a subset of the edges of the network |
| 24 | + which does not pass through any forks in the network. |
| 25 | + |
| 26 | + Given a linear network \code{X}, |
| 27 | + this function identifies the highways in \code{X} and assigns a label to each |
| 28 | + edge (segment) of the network indicating which highway it belongs to. |
| 29 | + |
| 30 | + Formally a highway is a set of edges joining successive |
| 31 | + vertices \eqn{v_1, \ldots, v_n}{v[1], ..., v[n]} of the network |
| 32 | + such that |
| 33 | + \itemize{ |
| 34 | + \item there is an edge of the network joining |
| 35 | + \eqn{v_i}{v[i]} and \eqn{v_{i+1}}{v[i+1]} for each \eqn{i} |
| 36 | + \item each of the intermediate vertices |
| 37 | + vertices \eqn{v_2, \ldots, v_{n-1}}{v[2], ..., v[n-1]} |
| 38 | + has degree 2 (i.e. there are exactly 2 edges of the network which |
| 39 | + end at the vertex) |
| 40 | + \item the terminal vertices \eqn{v_1}{v[1]} and \eqn{v_n}{v[n]} |
| 41 | + do not have degree 2, unless they are the same vertex. |
| 42 | + } |
| 43 | + |
| 44 | + Every edge (segment) of the network belomgs to a unique highway. |
| 45 | + This algorithm assigns a label to each edge indicating which highway |
| 46 | + it belongs to. If \code{what="labels"} (the default), the result is a |
| 47 | + factor of length equal to \code{nsegments(X)} giving the |
| 48 | + classification of segments. |
| 49 | + If \code{what="tessellation"}, the result is a tessellation of |
| 50 | + \code{X} (object of class \code{"lintess"}) in which the tiles of the |
| 51 | + tessellation are the highways. |
| 52 | +} |
| 53 | +\value{ |
| 54 | + A factor, or a tessellation on the network (object of class \code{"lintess"}). |
| 55 | +} |
| 56 | +\author{ |
| 57 | + \adrian |
| 58 | +} |
| 59 | +\seealso{ |
| 60 | + \code{\link{connected.linnet}} |
| 61 | +} |
| 62 | +\examples{ |
| 63 | + A <- edges(letterR) |
| 64 | + B <- edges(disc(centre=centroid.owin(letterR))) |
| 65 | + L <- as.linnet(superimpose(A,B)) |
| 66 | + plot(highways(L, what="tess"), |
| 67 | + col=rainbow, scramble.cols=TRUE, |
| 68 | + lwd=2, show.window=FALSE) |
| 69 | +} |
| 70 | +\keyword{spatial} |
| 71 | +\keyword{manip} |
| 72 | +\concept{Linear network} |
0 commit comments