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

Polyfill returning all intersecting hexagons, expansion of polygon factor. #331

Closed
rustyconover opened this issue Apr 14, 2020 · 2 comments

Comments

@rustyconover
Copy link
Contributor

I'm attempting to have polyfill return all hexagons intersected rather than just those hexagon's that have a center contained in the passed polygon.

It's been suggested that expanding the polygon by the average edge length of a hexagon at the target resolution is sufficient to ensure that the polygon is covered by polyfill. I've found that this isn't the case at various resolutions.

Please see this notebook:

https://observablehq.com/@rustyconover/ensuring-h3-polyfill-returns-all-hexagons-for-a-polygon

It seems that resolution 5 and expanding the polygon by the average hexagon edge length polyfill fails to find any intersecting hexagons.

By expanding by a factor of ~1.5 to 2 times the average hexagon length it seems that at all resolutions the polygon is completely covered. Is there a better procedure to follow for having polyfill return all intersecting hexagons?

@dfellis
Copy link
Collaborator

dfellis commented Apr 14, 2020

See my answer here.

@rustyconover
Copy link
Contributor Author

@dfellis Thats a perfect answer, thank you!

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

2 participants