-
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
API: the geo_json_conformant
argument of polygon_to_cells
is missing in v4
#307
Comments
geo_json_conformant
argument of polygon_to_cells
in v4geo_json_conformant
argument of polygon_to_cells
is missing in v4
Any updates on this? Also how can we get all h3 cells within a given polygon? Is it necessary to convert a normal polygon into an h3 polygon? if so an example would be really appreciated. I tried the following but it gives the error "Error: object of type 'Polygon' has no len()".
|
I'm working on the v4 interface here: #301 The major change is that we'll have functions like |
I am using v4 and I want to know the h3 cells contained within a shapely polygon. Currently how can we achieve this in v4, is there any work around for this? Please let me know. |
@mohit-at-delhivery by first creating a DataFrame with the h3-indexes given that the poly is a shapely Polygon and CRS is 4326
Then create the polygon geometry
but the problem with v4 is I am getting wrong shapes of the hex polygons. They are skewed, even when the projection is correct. So can't guarantee that. |
Hi @kamilmarwat .. the coordinates might be reversed if the grids are skewed? Here is a solution that I found which is similar to yours
Also you can take one/two hop neighbour grids of all h3 grids in the "cells" variable as well just to make sure that no area of the polygon is left without an h3 grid. |
uber/h3-py v3
polyfill
has an argument calledgeo_json_conformant
h3-py/src/h3/api/_api_template.py
Line 495 in f8958ac
But this argument is missing in uber/h3-py v4
polygon_to_cells
h3-py/src/h3/api/_api_template.py
Line 400 in 3eece40
But the document of uber/h3 v4 shows that
geo_json_conformant
is still inpolygon_to_cells
.The text was updated successfully, but these errors were encountered: