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

Drop duplicate or almost-duplicate edges #31

Open
tomalrussell opened this issue Feb 20, 2019 · 0 comments
Open

Drop duplicate or almost-duplicate edges #31

tomalrussell opened this issue Feb 20, 2019 · 0 comments

Comments

@tomalrussell
Copy link
Owner

Test for almost-equal lines, and/or equal geometries with different coordinate lists.

shapely has equals and almost_equals: https://shapely.readthedocs.io/en/stable/manual.html#object.equals

Consider buffer/contains test:

def almost_equals(a, b, tolerance):
    return a.buffer(tolerance).contains(b) && b.buffer(tolerance).contains(a)

Related concepts around smallest max distance between shapes - Hausdorff distance, Fréchet distance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant