"as.linnet"(X, ..., eps, sparse=FALSE)
"psp"
).
eps
units apart, they will be treated
as the same point, and will become a single vertex in the
linear network.
linnet
.
"linnet"
).
eps
. If any segments in X
cross over each other, they are first
cut into pieces using selfcut.psp
.
Then any pair of segment endpoints lying closer than eps
units apart, is treated as a single vertex. The linear network
is then constructed using linnet
.
It would be wise to check the result by plotting the degree of each vertex, as shown in the Examples.
If X
has marks, then these are stored in
the resulting linear network Y <- as.linnet(X)
,
and can be extracted as marks(as.psp(Y))
or marks(Y$lines)
.
linnet
, selfcut.psp
,
methods.linnet
.
# make some data
A <- psp(0.09, 0.55, 0.79, 0.80, window=owin())
B <- superimpose(A, as.psp(simplenet))
# convert to a linear network
D <- as.linnet(B)
# check validity
D
plot(D)
text(vertices(D), labels=vertexdegree(D))
Run the code above in your browser using DataLab