pysal.lib.weights.
min_threshold_dist_from_shapefile
(shapefile, radius=None, p=2)[源代码]¶具有自适应带宽的内核权重。
参数: |
|
---|---|
返回: |
|
笔记
支持多边形或点形状文件。对于多边形形状文件,距离基于多边形质心。距离是使用shapefile中的坐标定义的,假定该坐标是投影的,而不是地理坐标。
实例
>>> import pysal.lib
>>> md = pysal.lib.weights.user.min_threshold_dist_from_shapefile(pysal.lib.examples.get_path("columbus.shp"))
>>> md
0.6188641580768541
>>> pysal.lib.weights.user.min_threshold_dist_from_shapefile(pysal.lib.examples.get_path("stl_hom.shp"), pysal.lib.cg.sphere.RADIUS_EARTH_MILES)
31.846942936393717