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

h3SetToMultiPolygon bug with duplicate hexagon indices #92

Closed
Pessimistress opened this issue Sep 17, 2020 · 2 comments · Fixed by #97
Closed

h3SetToMultiPolygon bug with duplicate hexagon indices #92

Pessimistress opened this issue Sep 17, 2020 · 2 comments · Fixed by #97

Comments

@Pessimistress
Copy link

To reproduce:

Expected
image

Actual
image

@nrabinowitz
Copy link
Collaborator

At present, it's the responsibility of the caller to ensure that the indexes passed in are unique. Duplicate indexes, invalid indexes, or indexes at multiple resolutions result in undefined behavior. This is primarily a performance-based choice, as validating and de-duping the input set is potentially quite expensive, and is unnecessary if the input set is known to be valid by the caller.

This is not well-documented, though, so at a minimum we should add this warning to the docs.

@nrabinowitz
Copy link
Collaborator

nrabinowitz commented Sep 17, 2020

It is documented on the main H3 site under h3SetToLinkedGeo: https://h3geo.org/docs/api/regions

But we should definitely document on h3-js as well.

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

Successfully merging a pull request may close this issue.

2 participants