I have a polygon the size of an office block in WGS84 coordinate system.

When I run h3.polyfill at resolution 15 it should return a large number of h3 res15 addresses whose centroids are contained in the polygon.

Instead it returns an empty set - why?

I am using h3-3.7.4 with python 3.9.6 on Windows 11.

import h3

geojson = {"type":"Polygon",

h3_res15_ids = h3.polyfill(geojson, 15)



I thought maybe the trailing point which equals the first point might be the problem, but removing it does not change the output.

The polygon is: enter image description here


1 Answer 1


You need to use h3.polyfill_geojson(geojson, 15) or h3.polyfill(geojson, 15, geo_json_conformant=True)

  • 1
    Awesome thanks. Wish the documentation was a bit clearer...! Commented May 18, 2022 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.