pysal.lib.cg.
PolygonLocator
(polygons)[源代码]¶多边形索引数据结构的抽象表示。
方法
contains_point (点) |
返回包含点的多边形 |
inside \(查询矩形) |
返回查询矩形内的多边形 |
nearest \(查询点[,规则]) |
返回根据各种规则索引到查询点的最近多边形。 |
overlapping \(查询矩形) |
返回重叠查询矩形的多边形列表 |
proximity \(原点,r [,规则]) |
根据各种规则返回位于原点某一距离内的索引多边形。 |
region \(区域矩形) |
返回位于矩形查询区域内的索引多边形。 |
__init__
(polygons)[源代码]¶返回多边形定位器对象。
_初始化多边形列表->多边形定位器
参数: |
|
---|
实例
>>> p1 = Polygon([Point((0, 1)), Point((4, 5)), Point((5, 1))])
>>> p2 = Polygon([Point((3, 9)), Point((6, 7)), Point((1, 1))])
>>> pl = PolygonLocator([p1, p2])
>>> isinstance(pl, PolygonLocator)
True
方法
__init__ (多边形) |
返回多边形定位器对象。 |
contains_point (点) |
返回包含点的多边形 |
inside \(查询矩形) |
返回查询矩形内的多边形 |
nearest \(查询点[,规则]) |
返回根据各种规则索引到查询点的最近多边形。 |
overlapping \(查询矩形) |
返回重叠查询矩形的多边形列表 |
proximity \(原点,r [,规则]) |
根据各种规则返回位于原点某一距离内的索引多边形。 |
region \(区域矩形) |
返回位于矩形查询区域内的索引多边形。 |