Skip to content

Errors when a hole is touching an outer ring #39

Closed

Description

@mourner

Here's a bunch of OSM samples from @lbud with an Earcut error where the cause seems to be the same, a hole touching an outer ring.

https://gist.github.com/lbud/7371eb115344eb914a81
https://gist.github.com/lbud/717479a7743886c16199
https://gist.github.com/lbud/d4e2ccfd45b1c9435bd1
https://gist.github.com/lbud/de48ea431b6d2bfe192e
https://gist.github.com/lbud/9aecbc89dc949dc62d00
https://gist.github.com/lbud/8bf3f767f97fcff8e886
https://gist.github.com/lbud/785feed00fc58f3de1c7
https://gist.github.com/lbud/cbe6508faf1d092c9c0d
https://gist.github.com/lbud/02c00e32629768b10110
https://gist.github.com/lbud/ee6f62abb9696c464e56
https://gist.github.com/lbud/f003aadac93180fc28dc
https://gist.github.com/lbud/b9e1b83e64df5e1f9d11
https://gist.github.com/lbud/191bcf1a5d2712079fb8
https://gist.github.com/d57d0185442cffd68dbb
https://gist.github.com/a9e84efe8f3a7aace226
https://gist.github.com/9ca29f2e70f5f996194c
https://gist.github.com/57390cd817cb5237f9bc
https://gist.github.com/c6090ba2385ea5eb75f4
https://gist.github.com/71b4908bbbf07cace80c
https://gist.github.com/fa1056ac3be07dca5ba2
https://gist.github.com/d1b11e1009c7c786074c
https://gist.github.com/09e9b47ff90652f99ae5
https://gist.github.com/97314071aeff0b0d4f47
https://gist.github.com/34bc7f0b20f529b739d8

Activity

  1. mourner commented on Oct 21, 2015

    @mourner
    MemberAuthor

    The root cause of the issue is that the polygons Earcut sometimes fails on polygons with different vertices touching each other, like here where a hole vertice touches an outer ring vertice:

    image

    I'm now looking into a good way to handle cases like this without degrading performance.

  2. mourner commented on Oct 21, 2015

    @mourner
    MemberAuthor

    All failure samples are verified to be fixed by #40 \o/ cc @lbud @yhahn @springmeyer

  3. added a commit that references this issue on Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions