本文整理汇总了Python中tilecloud.BoundingPyramid.zget方法的典型用法代码示例。如果您正苦于以下问题:Python BoundingPyramid.zget方法的具体用法?Python BoundingPyramid.zget怎么用?Python BoundingPyramid.zget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tilecloud.BoundingPyramid
的用法示例。
在下文中一共展示了BoundingPyramid.zget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_fill
# 需要导入模块: from tilecloud import BoundingPyramid [as 别名]
# 或者: from tilecloud.BoundingPyramid import zget [as 别名]
def test_fill(self):
bp = BoundingPyramid()
bp.fill(xrange(0, 8), (572215.4395248143, 5684416.95917649, 1277662.36597472, 6145307.39552287))
self.assertEqual(bp.zget(0), (Bounds(0, 1), Bounds(0, 1)))
self.assertEqual(bp.zget(1), (Bounds(1, 2), Bounds(0, 1)))
self.assertEqual(bp.zget(2), (Bounds(2, 3), Bounds(1, 2)))
self.assertEqual(bp.zget(3), (Bounds(4, 5), Bounds(2, 3)))
self.assertEqual(bp.zget(4), (Bounds(8, 9), Bounds(5, 6)))
self.assertEqual(bp.zget(5), (Bounds(16, 18), Bounds(11, 12)))
self.assertEqual(bp.zget(6), (Bounds(32, 35), Bounds(22, 23)))
self.assertEqual(bp.zget(7), (Bounds(65, 69), Bounds(44, 46)))
示例2: test_fillup
# 需要导入模块: from tilecloud import BoundingPyramid [as 别名]
# 或者: from tilecloud.BoundingPyramid import zget [as 别名]
def test_fillup(self):
bp = BoundingPyramid()
bp.add(TileCoord(2, 1, 3))
bp.fillup(0)
self.assertEqual(bp.zget(1), (Bounds(0, 1), Bounds(1, 2)))
self.assertEqual(bp.zget(0), (Bounds(0, 1), Bounds(0, 1)))
示例3: test_filldown
# 需要导入模块: from tilecloud import BoundingPyramid [as 别名]
# 或者: from tilecloud.BoundingPyramid import zget [as 别名]
def test_filldown(self):
bp = BoundingPyramid()
bp.add(TileCoord(1, 1, 0))
bp.filldown(3)
self.assertEqual(bp.zget(2), (Bounds(2, 4), Bounds(0, 2)))
self.assertEqual(bp.zget(3), (Bounds(4, 8), Bounds(0, 4)))