def test_tile_to_meters_one(self): ellip = EllipsoidalMercator() z = x = y = 0 mx, my = ellip.tile_to_meters(z, x, y) mx = ellip.truncate(mx) my = ellip.truncate(my) assert float(mx) == -20037508.34 and \ float(my) == -20037508.34
def test_tile_to_lat_lon_five(self): # AGC z = 17 x = 37448 y = 80770 lat, lon = EllipsoidalMercator.tile_to_lat_lon(z, x, y) assert lat == 38.74009055509699 and \ lon == -77.14599609375
def test_tile_to_lat_lon_four(self): # Visually verified to show an # Antarctic tile z = 7 x = 114 y = 31 lat, lon = EllipsoidalMercator.tile_to_lat_lon(z, x, y) assert lat == -67.7443134783405 and \ lon == 140.625
def test_tile_to_lat_lon_three(self): # Visually verified that this tile # should be near Galva, Illinois z = 3 x = 2 y = 5 lat, lon = EllipsoidalMercator.tile_to_lat_lon(z, x, y) assert lat == 41.170427276143315 and \ lon == -90.0
def test_tile_to_lat_lon_two(self): z = 0 x = y = 1 lat, lon = EllipsoidalMercator.tile_to_lat_lon(z, x, y) assert lon == 180.0 and \ lat == 85.08405904978349
def test_tile_to_lat_lon_one(self): z = x = y = 0 lat, lon = EllipsoidalMercator.tile_to_lat_lon(z, x, y) assert lon == -180.0 and \ lat == -85.08405904978349