Exemple #1
0
 def test_tile_to_lat_lon_two(self):
     """Test the top right corner of zoom 0."""
     z = 0
     x = y = 1
     lat, lon = Mercator.tile_to_lat_lon(z, x, y)
     assert lon == 180.0 and lat == 85.0511287798066
     z = 14
     x = 11332
     y = 9870
     lat, lon = Mercator.tile_to_lat_lon(z, x, y)
     assert lon == 68.994140625 and \
         lat == 34.56085936708385
Exemple #2
0
 def test_tile_to_lat_lon_four(self):
     """Test a random tile to lat/lon."""
     z = 14
     x = 11333
     y = 9871
     lat, lon = Mercator.tile_to_lat_lon(z, x, y)
     assert lon == 69.01611328125 and \
         lat == 34.57895241036947
Exemple #3
0
 def test_tile_to_lat_lon_one(self):
     """Test conversion from tile coordinate to lat/lon."""
     z = x = y = 0
     lat, lon = Mercator.tile_to_lat_lon(z, x, y)
     assert lon == -180.0 and lat == -85.0511287798066