-
Notifications
You must be signed in to change notification settings - Fork 131
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 not working, two different sets of Polygons #177
Comments
Could you point me to the shapefiles? Or, better yet, do you think you could reduce it to a minimal example? |
Hi there, good to hear back from someone. In this example, poly_fill returns 0 for every Polygon in the exploded shapefile. We explode the shapefile because h3.polyfill can only accept singular Polygons. #obtain all hexagon locations
exploded = canada_boundary.explode()
for i, row in exploded.iterrows():
poly_fill=h3.polyfill(exploded.geometry[i].__geo_interface__, H3_res,geo_json_conformant=True) The shapefiles can be found at Ive only used the first two shape files, one being the provinces and territories cartographic and the other digital boundary. |
It may be the geo interface thing but it worked for one of the shapefiles. |
Please help, this issue is kind of pressing for me. |
I found this Explanation regarding my issue. |
Hi there,
My application uses this library in order to take a shapefile of Canada and plot a grid of Hexagons (chloropleth map) and it seems when I use the same algorithm on two different shapefiles (sets of polygons), the polyfill returns the correct number of hexagons for one of them, and zero for the other. I have confirmed the issue has not to do with the resolution used. One of the shapefiles is just the provinces of Canada, and the other includes sea areas as well.
My code is the following.
Any advice would be appreciated, thanks!
Ask any questions necessary.
The text was updated successfully, but these errors were encountered: