我有一个 rtree,其中包含点,即 left == right && top == bottom:
...
idx = index.Index()
....
*print list(idx.nearest((rand_point[0], rand_point[1], rand_point[0], rand_point[1])))
...
left, bottom, right, top = (newpoint[0], newpoint[1], newpoint[0], newpoint[1])
idx.insert(i, (left, bottom, right, top))
...
代替点的是一些长代码,它定义了“point”、“newpoint”、“i”以及循环中的所有内容。标有 * 的行返回类似:
[0L]
[0L]
[2L]
[2L]
[1L]
[4L]
[6L]
[5L].....
问题是如何得到一个点,即(左、下、右、上)知道这个输出?