當前位置: 首頁>>代碼示例>>Python>>正文


Python BoundingPyramid.zget方法代碼示例

本文整理匯總了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)))
開發者ID:Web5design,項目名稱:tilecloud,代碼行數:13,代碼來源:test_boundingpyramid.py

示例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)))
開發者ID:gijs,項目名稱:tilecloud,代碼行數:8,代碼來源:test_boundingpyramid.py

示例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)))
開發者ID:gijs,項目名稱:tilecloud,代碼行數:8,代碼來源:test_boundingpyramid.py


注:本文中的tilecloud.BoundingPyramid.zget方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。