-
Notifications
You must be signed in to change notification settings - Fork 54
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
H3 Polyfill skipping areas near the boundary #41
Comments
So assignment to a polygon is based on the location of the center points of the hexagons. This was chosen because if you have two perfectly contiguous polygons, the entire hexagon grid will be assigned to only one polygon, instead of potentially two, maintaining the contiguous nature of the two polygons after the polyfill. To get the behavior you appear to desire - any hexagon that touches the polygon is included - you can simply expand the polygon by the edge length of the hexagons. This page describes how to do this perfectly, but this simpler algorithm would probably suffice. |
Actually expanding by the edge length is insufficient. See: You may need to expand by edge length * 2.0. |
You only need to expand around the polygon by the edge length. You're confusing a border around an arbitrary polygon with a radius. To create a border equal to the edge length for a circle you need to add 2 times the edge length to it, but the length of the distance between an arbitrary point on the circle and the closest point on the expanded circle would be just the edge length. |
@dfellis understanding and implementation Minkowski sum is quite time consumming. May be it will be better if we add some optional boolean parameter to That would save a lot of time for many people |
@kamil-kielczewski work has already started on adding multiple polyfill modes in the planned 4.0 of H3. If you wish to save a lot of time for many people, feel free to help getting this over the line sooner. |
Hi I have noticed, when using polyfill for a polygon, it randomly skips certain areas near the boundary. How can we solve this?
For example. In this image blue dots are polygon side, and red is center. Notice the area in Cayote Point is not part of any polygon. So, polyfill will skip it even if that is part of the boundary.
Seems like if center is not part of boudary, it skips the whole polygon.
The text was updated successfully, but these errors were encountered: