Ejemplo n.º 1
0
    def test_no_bounds(self):
        js = {"scheme": "xyz"}

        tj = _get_loaded(js)
        b = tj.bounds_tile(14)
        self.assertIsNotNone(b)
        world_bounds_tile = get_tile_bounds(zoom=14,
                                            source_crs=4326,
                                            scheme="xyz",
                                            bounds=WORLD_BOUNDS)
        self.assertEqual(world_bounds_tile, b)
Ejemplo n.º 2
0
 def test_manual_bounds_xyz(self):
     # boundary for mbtiles zurich 4 tiles in bottom left corner
     b = [8.268328, 47.222658, 8.298712, 47.243988]
     t = get_tile_bounds(14, b, scheme="xyz", source_crs=4326)
     bounds_expected = {
         "x_min": 8568,
         "y_min": 5746,
         "x_max": 8569,
         "y_max": 5747,
         "zoom": 14,
         "width": 2,
         "height": 2
     }
     self.assertEqual(bounds_expected, t)