pysal.lib.cg.get_points_dist

pysal.lib.cg.get_points_dist(pt1, pt2)[源代码]

返回一对点之间的距离。

获取点距离(点,点)->数字

参数:
pt1 : 一点
pt2 : 另一点

实例

>>> get_points_dist(Point((4, 4)), Point((4, 8)))
4.0
>>> get_points_dist(Point((0, 0)), Point((0, 0)))
0.0