Closed pugsley closed 3 years ago
I can reproduce this in Observable as well, though it's less deterministic 😢. Cannot repro in h3-py
, which makes me think this is JS-specific, probably due to something in Emscripten. Will investigate.
Thanks for bringing this up! This was a problem with the JS binding, fix currrently in review.
Thanks, really appreciate the speedy fix! 👍
Thank you for the easy repro scenario! This would have been very difficult to debug without a deterministic reproduction.
It seems that calling
polyfill
with a complex polygon (that crosses the antimeridian) messes with the h3 internals somehow, causing subsequent calls to return incorrect results.This is best demonstrated by this jsfiddle: https://jsfiddle.net/tamaxerra/kxz865m7/1/
The console output from the fiddle is the number of h3 indexes returned:
The first (36) and last (27) count are the result of the same polygon being passed.