pysal.explore.spaghetti.
snap_points_on_segments
(points, segments)[源代码]¶将点放在一组分段中的壁橱分段上
参数: |
|
---|---|
返回: |
|
实例
>>> import pysal.explore.spaghetti as spgh
>>> from pysal.lib.cg.shapes import Point, Chain
>>> points = {0: Point((1,1))}
>>> segments = [Chain([Point((0,0)), Point((2,0))])]
>>> spgh.util.snap_points_on_segments(points, segments)
{0: ([(0.0, 0.0), (2.0, 0.0)], array([1., 0.]))}