method polygon_to_cells seems to not exist in H3 library

370 Views Asked by At

From the Uber h3 api documentation page (https://uber.github.io/h3-py/api_reference.html#), they have a method called: polygon_to_cells which is suppose to transform a given Polygon to a H3 index given a H3 resolution. However, I call this method both in Python (3.6) and from Snowflake UDF (Python 3.9) and in both cases I get the error message back: module 'h3' has no attribute 'polygon_to_cells'

Has anyone faced the same issue?

1

There are 1 best solutions below

0
Gabriel On

I found another documentation that shad the light into the issue (https://nbviewer.org/github/uber/h3-py-notebooks/blob/master/notebooks/usage.ipynb).

First I had to do my import as:

import h3
h3.polyfill(my_polygon, my_resolution)