Calculates the connectivity matrix for a river network, during import and editing. Called internally.

calculateconnections(lines, tolerance)

Arguments

lines

A list of coordinate matrices, each corresponding to a line segment.

tolerance

The spatial tolerance for establishing connectivity.

Value

A matrix with topological information. See the $connections element of the rivernetwork-class.

Examples

Gulk_connections <- calculateconnections(lines=Gulk$lines, tolerance=Gulk$tolerance)