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

Error: Unable to complete output ring #139

Open
Tracked by #1
viridia opened this issue Aug 2, 2022 · 0 comments
Open
Tracked by #1

Error: Unable to complete output ring #139

viridia opened this issue Aug 2, 2022 · 0 comments

Comments

@viridia
Copy link

viridia commented Aug 2, 2022

I'm getting the following exception and I'm not sure why. The input looks good to me.

Error: Unable to complete output ring starting at [0, 56]. Last matching segment found ends at [0.7000000000000001, 55.6].

Here's what I am passing as input, it is 100% reproducible for me:

const polygon = [[
  [[0,56],[4,56],[4,60],[0,60],[0,56]],
  [[0.5,56.4],[0.5,56.6],[1.5,56.6],[1.5,56.4],[0.5,56.4]]
]];

const clip = [[
  [2.3000000000000003,55.6],
  [0.7000000000000001,55.6],
  [0.6999999999999998,56.4],
  [2.3,56.4],
  [2.3000000000000003,55.6]
]];

return difference(polygon, clip);

Works fine with other inputs, just this particular set of polys causes the problem.

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