Network.compute_distance_to_nodes(x, y, edge)[source]

Given an observation on a network edge, return the distance to the two nodes that bound that end.

x : float

x-coordinate of the snapped point.

y : float

y-coordiante of the snapped point.

edge : tuple

(node0, node1) representation of the network edge.

d1 : float

The distance to node0. Always the node with the lesser id.

d2 : float

The distance to node1. Always the node with the greater id.