pysal.explore.spaghetti.compute_length

pysal.explore.spaghetti.compute_length(v0, v1)[source]

Compute the euclidean distance between two points.

Parameters:
v0 : tuple

sequence in the form x, y

vq : tuple

sequence in the form x, y

Returns:
euc_dist : float

Euclidean distance

Examples

>>> import pysal.explore.spaghetti as spgh
>>> point1, point2 = (0,0), (1,1)
>>> spgh.util.compute_length(point1, point2)
1.4142135623730951