Skip to contents

Validate the structure of a sfnetwork

Usage

validate_network(x, message = TRUE)

Arguments

x

An object of class sfnetwork.

message

Should messages be printed during validation? Defaults to TRUE.

Value

Nothing when the network is valid. Otherwise, an error is thrown.

Details

A valid sfnetwork structure means that all nodes have POINT geometries, and - when edges are spatially explicit - all edges have LINESTRING geometries, nodes and edges have the same coordinate reference system and the same coordinate precision, and coordinates of edge boundaries match coordinates of their corresponding nodes.