polygonToCells fails on a rectangular polygon
Opened this issue · 0 comments
jogoussard commented
Hi
Given this rectangular polygon
POLYGON((11.147991 64.75815699999998,11.443969 64.75815699999998,11.443969 64.845147,11.147991 64.845147,11.147991 64.75815699999998))
the polygonToCells call fails with
com.uber.h3core.exceptions.H3Exception: The operation failed but a more specific error is not available
Test program to reproduce:
var coords = List.of(
new LatLng(64.758157,11.147991),
new LatLng(64.758157,11.443969),
new LatLng(64.845147,11.443969),
new LatLng(64.845147,11.147991),
new LatLng(64.758157,11.147991));
H3Core.newInstance().polygonToCells(coords, List.of(), 10);
The ''same'' polygon shifted at latitudes of 63 degrees works without issue.
Library version: com.uber:h3:4.1.1
OS: Mac Os Ventura 13.5
Processor: 2.6 GHz 6-Core Intel Core i7
Memory: 32GB
Any potential fix/workaround suggestion?
Thanks a lot