diff --git a/tests/test_tile.py b/tests/test_tile.py index 8b5f48b2..1c68de5a 100644 --- a/tests/test_tile.py +++ b/tests/test_tile.py @@ -125,3 +125,18 @@ def test_tiles_children_range(self): exp.sort() for actual_child, exp_child in zip(actual, exp): self.assertEqual(exp_child, actual_child) + + +class TestReproject(unittest.TestCase): + + def test_reproject(self): + from tilequeue.tile import reproject_lnglat_to_mercator + coord = reproject_lnglat_to_mercator(0, 0) + self.assertAlmostEqual(0, coord[0]) + self.assertAlmostEqual(0, coord[1]) + + def test_reproject_with_z(self): + from tilequeue.tile import reproject_lnglat_to_mercator + coord = reproject_lnglat_to_mercator(0, 0, 0) + self.assertAlmostEqual(0, coord[0]) + self.assertAlmostEqual(0, coord[1]) diff --git a/tilequeue/tile.py b/tilequeue/tile.py index ce741b9d..d46d3775 100644 --- a/tilequeue/tile.py +++ b/tilequeue/tile.py @@ -93,7 +93,7 @@ def coord_to_bounds(coord): return bounds -def reproject_lnglat_to_mercator(x, y): +def reproject_lnglat_to_mercator(x, y, *unused_coords): return pyproj.transform(latlng_proj, merc_proj, x, y)