Learn R Programming

stplanr (version 0.0.2)

islines: Do the intersections between two geometries create lines?

Description

This is a function required in overline. It identifies whether sets of lines overlap (beyond shared points) or not.

Usage

islines(g1, g2)

Arguments

g1
A SpatialLinesDataFrame
g2
A SpatialLinesDataFrame

Examples

Run this code
data(routes_fast)
rnet <- overline(routes_fast[c(2, 3, 22),], attrib = "length")
r1 <- routes_fast[2,]
r2 <- routes_fast[3,]
r3 <- routes_fast[22,]
plot(rnet)
lines(r3, col = "red") # line without overlaps
islines(r1, r2)
islines(r1, r3)
islines(r2, r3)

Run the code above in your browser using DataLab