How to use the mercantile._xy function in mercantile

To help you get started, we’ve selected a few mercantile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapbox / mercantile / tests / test_funcs.py View on Github external
def test__xy_north_of_limit(lat):
    x, y = mercantile._xy(0.0, lat)
    assert x == 0.5
    assert y < 0
github mapbox / mercantile / tests / test_funcs.py View on Github external
def test__xy_south_of_limit(lat):
    x, y = mercantile._xy(0.0, lat)
    assert x == 0.5
    assert y > 1
github mapbox / mercantile / tests / test_funcs.py View on Github external
def test__xy_limits(lat, fy):
    x, y = mercantile._xy(0.0, lat)
    assert x == 0.5
    assert y == pytest.approx(fy)
github mapbox / mercantile / tests / test_funcs.py View on Github external
def test__xy_poles(lat):
    with pytest.raises(mercantile.InvalidLatitudeError):
        mercantile._xy(0.0, lat)