Skip to content

Drop duplicate or almost-duplicate edges #31

@tomalrussell

Description

@tomalrussell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions