Learn R Programming

shp2graph (version 1-0)

nt.connect: Check the connectivity of a given network

Description

A function to check the connectivity of a given network.

Usage

nt.connect(nt)

Arguments

nt

A “SpatialLines” or “SpatialLinesDataFrame” object.

Author

Binbin Lu binbinlu@whu.edu.cn

Details

In this function, all the nodes are traversed, and classified dynamically via a rule, that any pair of different nodes fall into a same category if they could be reached from each other. A map will be plotted spontaneously with differet categories (i.e. self-connected parts) in distinct colors. Finally, the self-connected part with the most nodes will be returned as a new “SpatialLinesDataFrame” object.