# NOT RUN {
# 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
L <- as.linnet(B)
# check validity
L
plot(L)
text(vertices(L), labels=vertexdegree(L))
# show the pieces that came from original segment number 1
S <- as.psp(L)
(camefrom <- attr(L, "camefrom"))
parts <- which(camefrom == 1)
plot(S[parts], add=TRUE, col="green", lwd=2)
# }
Run the code above in your browser using DataLab