
Last chance! 50% off unlimited learning
Sale ends in
data(routes_fast)
data(cents)
rnet <- overline(sldf = routes_fast[1:7,], attrib = "length")
plot(rnet)
points(cents)
lineLabels(sldf = rnet, "length")
sum(routes_fast$length[1:7], na.rm = TRUE) # verify highest flow
data(flowlines)
plot(flowlines)
aggflow <- overline(flowlines, attrib = "All")
nrow(aggflow)
aggflow2 <- overline(flowlines, attrib = "All", na.zero = TRUE)
plot(aggflow2) # 8 lines
sel <- as.logical(colSums(gEquals(flowlines, aggflow2, byid = TRUE)))
flowlines_sub <- flowlines[!sel,]
plot(flowlines_sub)
flowlines_2way <- flowlines[sel,]
library(maptools)
flowlines_2way <- spChFIDs(flowlines_2way, as.character(100001:(nrow(flowlines_2way) + 100000)))
flowlines_1way <- maptools::spRbind(flowlines_sub, flowlines_2way)
overlaps <- over()
nrow(overlaps)
Run the code above in your browser using DataLab