Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rounding error causes snap_bounds() to fail #41

Open
ungarj opened this issue Mar 1, 2021 · 0 comments
Open

rounding error causes snap_bounds() to fail #41

ungarj opened this issue Mar 1, 2021 · 0 comments
Labels

Comments

@ungarj
Copy link
Owner

ungarj commented Mar 1, 2021

the following test fails at zoom 15:

def test_snap_bounds_edge_cases():
    # as zoom level increases, so increases the potential rounding errors
    tp = TilePyramid("geodetic")
    for zoom in range(18):
        snapped = snap_bounds(bounds=tp.bounds, tile_pyramid=tp, zoom=zoom)
        assert snapped == tp.bounds

at some point the check whether a given point hits the border between two tiles fails which subsequently causes the snap_bounds function to return a tile outside of the tile matrix

@ungarj ungarj added the bug label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant