本文整理匯總了Python中tiles.TilesManager.tileslist方法的典型用法代碼示例。如果您正苦於以下問題:Python TilesManager.tileslist方法的具體用法?Python TilesManager.tileslist怎麽用?Python TilesManager.tileslist使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tiles.TilesManager
的用法示例。
在下文中一共展示了TilesManager.tileslist方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_tileslist
# 需要導入模塊: from tiles import TilesManager [as 別名]
# 或者: from tiles.TilesManager import tileslist [as 別名]
def test_tileslist(self):
mb = TilesManager()
# World at level 0
l = mb.tileslist((-180.0, -90.0, 180.0, 90.0), [0])
self.assertEqual(l, [(0, 0, 0)])
# World at levels [0, 1]
l = mb.tileslist((-180.0, -90.0, 180.0, 90.0), [0, 1])
self.assertEqual(l, [(0, 0, 0),
(1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)])
# Incorrect bounds
self.assertRaises(InvalidCoverageError, mb.tileslist, (-91.0, -180.0), [0])
self.assertRaises(InvalidCoverageError, mb.tileslist, (-90.0, -180.0, 180.0, 90.0), [])
self.assertRaises(InvalidCoverageError, mb.tileslist, (-91.0, -180.0, 180.0, 90.0), [0])
self.assertRaises(InvalidCoverageError, mb.tileslist, (-91.0, -180.0, 181.0, 90.0), [0])
self.assertRaises(InvalidCoverageError, mb.tileslist, (-90.0, 180.0, 180.0, 90.0), [0])
self.assertRaises(InvalidCoverageError, mb.tileslist, (-30.0, -90.0, -50.0, 90.0), [0])
示例2: test_tileslist_at_z1_x0_y0_tms
# 需要導入模塊: from tiles import TilesManager [as 別名]
# 或者: from tiles.TilesManager import tileslist [as 別名]
def test_tileslist_at_z1_x0_y0_tms(self):
mb = TilesManager()
l = mb.tileslist((-180.0, 1, -1, 90.0), [1], scheme='tms')
self.assertEqual(l, [(1, 0, 1)])
示例3: test_tileslist_at_z1_x0_y0
# 需要導入模塊: from tiles import TilesManager [as 別名]
# 或者: from tiles.TilesManager import tileslist [as 別名]
def test_tileslist_at_z1_x0_y0(self):
mb = TilesManager()
l = mb.tileslist((-180.0, 1, -1, 90.0), [1])
self.assertEqual(l, [(1, 0, 0)])