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

What h3 indexes polyfill() returns? #55

Closed
alexkokorin2 opened this issue May 15, 2018 · 1 comment
Closed

What h3 indexes polyfill() returns? #55

alexkokorin2 opened this issue May 15, 2018 · 1 comment

Comments

@alexkokorin2
Copy link

I believe that's a strange behavior: https://imgur.com/a/HHz2VGj (purple points are the ones I passed as a polygon, holes = null). Does it return all of the hexagons such that its centroid's inside of the polygon?

@alexkokorin2 alexkokorin2 changed the title What does polyfill() return? What h3 indexes does polyfill() return? May 15, 2018
@alexkokorin2 alexkokorin2 changed the title What h3 indexes does polyfill() return? What h3 indexes polyfill() returns? May 15, 2018
@dfellis
Copy link
Collaborator

dfellis commented May 15, 2018

Yes. This way if you pass in a polygon sharing one of the sides, you will not get either of the hexagons that cross through the polygon.

If you want only the hexagons that are exactly within the polygon and no further, you need to create a new polygon exactly 'r' meters inside of the current polygon, where 'r' is the edge length of the hexagon at the resolution you're working in.

For this resolution, you will get zero hexagons that way.

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