Learn R Programming

spNetwork (version 0.1.1)

graph_checking: Topological error

Description

A utility function to find topological errors in a network.

Usage

graph_checking(lines, digits, tol)

Arguments

lines

A SpatialLinesDataFrame representing the network

digits

An integer indicating the number of digits to retain for coordinates

tol

A float indicating the tolerance distance to identify a dangle node

Value

A list with two elements. The first is a SpatialPointsDataFrame indicating for each node of the network to which component it belongs. The second is a SpatialPointsDataFrame with the dangle nodes of the network.

Examples

Run this code
# NOT RUN {
networkgpkg <- system.file("extdata", "networks.gpkg", package = "spNetwork", mustWork = TRUE)
mtl_network <- rgdal::readOGR(networkgpkg,layer="mtl_network", verbose=FALSE)
topo_errors <- graph_checking(mtl_network, 2, 2)
# }

Run the code above in your browser using DataLab