Closed jleedev closed 1 year ago
That is odd. This seems to be a core library issue.
Can anyone reproduce in other bindings? And does this persist in v4.0.1?
So this seems to be happening because the input is mixed resolution. Currently, compact_cells
only works for inputs of cells all sharing the same resolution.
It doesn't look like we currently mention this in the docs. We should update them!
Ah, yes. I had misread from https://github.com/uber/h3/issues/298 that it should be idempotent, but clearly it's not supposed to be.
https://github.com/uber/h3-js#module_h3.compactCells does mention the same resolution, already, I just can't read.
The error code leaves a little to be desired, though.
A future version of compact_cells
will be idempotent, able to handle duplicates, and handle mixed resolutions, but that's blocked on me getting back to https://github.com/uber/h3/pull/552
This set of cells (which contains no duplicates) is rejected by compact_cells, depending on the order.