-
Notifications
You must be signed in to change notification settings - Fork 132
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
Algorithm implementation of polyfill #300
Comments
I think the existing polyfill implementation checks which cell centers intersects the geometry of interest. It does not check against actual cell boundaries |
That's correct. Using cell center containment guarantees that two contiguous polygons (with perfect overlap of some of the points of the polygon, like ZCTAs or other regional boundaries) will produce perfectly contiguous sets of H3 cells where there are zero cells that end up in both sets. That was a hard requirement for the conversion of Uber's internal geofences to H3 during a transition phase where some surge algorithms continued operating on distinct geofences but needed to be rendered in conjunction with other algorithms that used H3 natively. One caveat, though, is that cell center containment is done in Now that H3 4.0 has made it possible to start adding new polyfill algorithms, though, I'm hoping to make other containment and projection combinations available. :) (Once I have some spare time, that is. :/ ) |
Yes, the current polyfill does not meet my needs perfectly. I want to ask where I can see the algorithm implemented by the polyfill and improve it. |
So the implementation lives here but it hasn't been refactored to use the |
The current polyfill algorithm is to find all h3 points whose mesh center is located in the polygon. I want to find an algorithm to find that all the vertices of its h3 hexagon are located in the polygon |
We've discussed this for some time - but note that "all vertices within" is not the same as "contains", as you could still have edges of the polygon that intersect edges of the cell. We'd welcome contributions here if you are interested in providing them. At the moment, however, it might be easiest for you to post-process the output by filtering out cells that are not fully contained. |
I am very interested in the polyfill function when using h3. I want to find the specific definition of this function, but I can't find it in the local library or github. Can you share the specific code implementation?
The text was updated successfully, but these errors were encountered: