Network.
distancebandweights
(threshold, n_proccess=None, gen_tree=False)[源代码]¶创建基于距离的权重。
参数: |
|
---|---|
返回: |
|
实例
>>> import pysal.explore.spaghetti as spgh
>>> streets_file = examples.get_path('streets.shp')
>>> ntw = spgh.Network(in_data=streets_file)
>>> w = ntw.distancebandweights(threshold=500)
>>> w.n
230
>>> w.histogram
[(1, 22), (2, 58), (3, 63), (4, 40), (5, 36), (6, 3), (7, 5), (8, 3)]