def test_orthophoto_download(self):
     bbox = self.ZurichBellvue()
     tl = TileLoader.from_bbox(bbox, False)
     tile = tl.load_tile()
     img = tile.image
     self.assertEquals(img.size[0], 1792)
     self.assertEquals(img.size[1], 1280)
 def test_new_bbox(self):
     tl = TileLoader.from_bbox(self.smallTestBbox(), False)
     tile = tl.load_tile()
     tile_bbox = tile.bbox
     self.assertAlmostEqual(tile_bbox.left, 8.5425567627, 5)
     self.assertAlmostEqual(tile_bbox.bottom, 47.3658039665, 5)
     self.assertAlmostEqual(tile_bbox.right, 8.5432434082, 5)
     self.assertAlmostEqual(tile_bbox.top, 47.3681292923, 5)
    def from_bbox(cls, bbox):
        drawer = cls()
        drawer.bbox = bbox



        tileloader = TileLoader.from_bbox(bbox)
        drawer.tile = tileloader.load_tile()
        streetloader = StreetLoader()
        drawer.streets = streetloader.load_streets(drawer.tile.bbox)

        return drawer
from src.data.TileLoader import TileLoader
from src.base.Bbox import Bbox

'''
Download all tiles in a specific BBox
'''

zurich_bellevu = Bbox.from_lbrt(8.54279671719532, 47.366177501999516, 8.547088251618977, 47.36781249586627)
tl = TileLoader.from_bbox(zurich_bellevu)
tile = tl.load_tile()
tile.show()
    def load_tiles(self):
        self.status_printer.start_load_tiles()

        loader = TileLoader.from_bbox(self.bbox, self.verbose)
        self.tile = loader.load_tile()
        self.bbox = self.tile.bbox