pysal.explore.spaghetti.compute_length

pysal.explore.spaghetti.compute_length(v0, v1)[源代码]

计算两点之间的欧几里得距离。

参数:
v0 : 元组

以x,y形式排列

vq : 元组

以x,y形式排列

返回:
euc_dist : 浮动

欧几里得距离

实例

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