Beispiel #1
0
 def test_tile_to_map_coordinates_1(self):
     gmp = GlobalMercatorProfile()
     tile = Tile(1, 2)
     try:
         gmp.to_map_coordinates(tile)
         assert False
     except NotImplementedError as e:
         assert e is not None and type(e) == NotImplementedError
Beispiel #2
0
 def test_upper_left_tile(self):
     """Test upper left tile method"""
     gmp = GlobalMercatorProfile()
     tile = Tile(0, 1)
     zoom = 1
     result_tile, result_zoom = gmp.upper_left_tile(tile, zoom)
     assert result_tile.tx == tile.tx and \
         result_tile.ty == 0 and \
         result_zoom == zoom
Beispiel #3
0
 def test_quad_tree_1(self):
     itp = ITileProfile()
     tile = Tile(0, 31)
     zoom = 13
     result = itp.quad_tree(tile, zoom)
     assert result == '2222222200000'
Beispiel #4
0
 def test_upper_left_tile_2(self):
     itp = ITileProfile()
     tile = Tile(0, 31)
     zoom = 13
     result = itp.upper_left_tile(tile, zoom)
     assert result.tx == 0 and result.ty == 8160
Beispiel #5
0
 def test_lower_left_tile_1(self):
     itp = ITileProfile()
     tile = Tile(0, 0)
     zoom = 1
     result = itp.lower_left_tile(tile, zoom)
     assert result.tx == 0 and result.ty == 0
Beispiel #6
0
 def test_tile_to_tile_1(self):
     gmp = GlobalMercatorProfile()
     tile = Tile(34, 100)
     result = gmp.to_tile(tile)
     assert result.tx == tile.tx and \
         result.ty == tile.ty