pysal.lib.cg.Grid

class pysal.lib.cg.Grid(bounds, resolution)[源代码]

表示一个分块数据结构。

方法

add \(项目,pt) 在指定位置向网格中添加项。
bounds \(界限) 返回在指定边界内的网格中找到的项的列表。
in_grid \(LOC) 返回两元组位置“loc”是否位于网格边界内。
nearest [(Pt)] 将最近的项返回到一个点。
proximity [(Pt,r)] 返回在网格中指定距离内找到的项的列表。
remove \(项目,pt) 在指定位置从网格中删除项。
__init__(bounds, resolution)[源代码]

返回具有指定属性的网格。

_ Init_uuuu(矩形,数字)->网格

参数:
bounds : 网格要包含的区域
resolution : 每个料仓的直径

实例

TODO:完成此doctest>>g=grid(矩形(0,0,10,10),1)

方法

__init__ \(边界,分辨率) 返回具有指定属性的网格。
add \(项目,pt) 在指定位置向网格中添加项。
bounds \(界限) 返回在指定边界内的网格中找到的项的列表。
in_grid \(LOC) 返回两元组位置“loc”是否位于网格边界内。
nearest [(Pt)] 将最近的项返回到一个点。
proximity [(Pt,r)] 返回在网格中指定距离内找到的项的列表。
remove \(项目,pt) 在指定位置从网格中删除项。