Open h2923250018 opened 3 days ago
Can you provide the complete set of coordinates for the polygon you are working with? Maybe WKT or geojson format.
Can you provide the complete set of coordinates for the polygon you are working with? Maybe WKT or geojson format.
Hello, I do the Latest version of java, Due to the following polygon API in H3Core
public List<Long> polygonToCells(List<LatLng> points, List<List<LatLng>> holes, int res)
I use draws a circle (32-sided polygon) on the North Pole point,But the API returns no result and pops com.Uber.H3core.exceptions.H3Exception: The operation failed but a more specific error is not available。
I can holes is null, res is 12 and the List of polygons are
[[9.9999999999998, 89.91006780247949, 0], [15.6249999999998, 89.91006780247949, 0], [21.25, 89.91006780247949, 0], [26.874999999999996, 89.91006780247949, 0], [32.5, 89.91006780247949, 0], [38.12499999999999, 89.91006780247949, 0], [43.750000 00000001,89.91006780247949, 0], [49.37499999999999, 89.91006780247949, 0]. [54.99999999999999, 89.91006780247949, 0], [60.625, 89.91006780247949, 0], [66.25, 89.91006780247949, 0], [71.875, 89.91006780247949, 0], [77.5, 89.91006780247949, 0], [83.125, 89.91006780247949, 0], [88.75, 89.91006780247949, 0], [94.374999999999, 89.91006780247949, 0], [100.0, 89.91006780247949, 0], [105.625, 89.91006780247949, 0], [111.25000000000001, 89.91006780247949, 0], [116.874999999999, 89.91006780247949, 0], [122.50000000000001, 128.125, 89.91006780247949, 89.91006780247949, 0], [0], [133.749999999997, 89.91006780247949, 0], [139.375, 89.91006780247949, 0], [145.0, 89.91006780247949, 0], [150.62500000000003, 89.91006780247949, 0], [156.25, 89.91006780247949, 0] [161.87499999999997, 167.5, 89.91006780247949, 89.91006780247949, 0], [0], [173.125, 89.91006780247949, 0], [178.749999999997, 89.91006780247949, 0]. [175.62500000000003, 89.91006780247949, 0], [164.375, 89.91006780247949, 0], [158.75, 89.91006780247949, 0], [153.12500000000003, 89.91006780247949, 0], [147.5, 141.875, 89.91006780247949, 89.91006780247949, 0], [0], [25000000000003-136.,89.91006780247949, 0]. [130.62500000000003, 89.91006780247949, 0], [125.00000000000001, 89.91006780247949, 0]. [119.37500000000003, 89.91006780247949, 0], [113.75, 89.91006780247949, 0], [108.12500000000003, 89.91006780247949, 0], [- 102. 50000000000006,89.91006780247949, 0], [96.87500000000001, 89.91006780247949, 0], [91.25000000000004, 89.91006780247949, 0], [... 85.625, 89.91006780247949, 0], [80.00000000000001, 89.91006780247949, 0], [74.37500000000003, 89.91006780247949, 0], [68.75, 89.91006780247949, 0], [63.125000000000014, 89.91006780247949, 0], [57.4999999999986,89.91006780247949, 0], [51.875000000000 01,89.91006780247949, 0], [46.250000000000036, 40.62499999999999, 89.91006780247949, 89.91006780247949, 0], [0], [35.00000000 000003,89.91006780247949, 0]. [29.375000000000032, 89.91006780247949, 0], [23.75, 89.91006780247949, 0], [18.125000000000018, 89.91006780247949, 0], [12.500000000000039, 89.91006780247949, 0], [6.87500000000001, 89.91006780247949, 0], [1.2500000000000 278,89.91006780247949, 0], [4.375000000000006, 89.91006780247949, 0], [9.999999999999986, 89.91006780247949, 0]]
Might be just a formatting issue, but I think there is something not right about your list of coordinates. See how the list you provided looks when I isolated each bracketed coordinate to its own line. I see a few periods where commas may be expected, and a "...", and some malformed coordinates (more than 3 elements, only one element, etc).
[ [9.9999999999998, 89.91006780247949, 0], [15.6249999999998, 89.91006780247949, 0], [21.25, 89.91006780247949, 0], [26.874999999999996, 89.91006780247949, 0], [32.5, 89.91006780247949, 0], [38.12499999999999, 89.91006780247949, 0], [43.750000 00000001,89.91006780247949, 0], [49.37499999999999, 89.91006780247949, 0]. [54.99999999999999, 89.91006780247949, 0], [60.625, 89.91006780247949, 0], [66.25, 89.91006780247949, 0], [71.875, 89.91006780247949, 0], [77.5, 89.91006780247949, 0], [83.125, 89.91006780247949, 0], [88.75, 89.91006780247949, 0], [94.374999999999, 89.91006780247949, 0], [100.0, 89.91006780247949, 0], [105.625, 89.91006780247949, 0], [111.25000000000001, 89.91006780247949, 0], [116.874999999999, 89.91006780247949, 0], [122.50000000000001, 128.125, 89.91006780247949, 89.91006780247949, 0], [0], [133.749999999997, 89.91006780247949, 0], [139.375, 89.91006780247949, 0], [145.0, 89.91006780247949, 0], [150.62500000000003, 89.91006780247949, 0], [156.25, 89.91006780247949, 0] [161.87499999999997, 167.5, 89.91006780247949, 89.91006780247949, 0], [0], [173.125, 89.91006780247949, 0], [178.749999999997, 89.91006780247949, 0]. [175.62500000000003, 89.91006780247949, 0], [164.375, 89.91006780247949, 0], [158.75, 89.91006780247949, 0], [153.12500000000003, 89.91006780247949, 0], [147.5, 141.875, 89.91006780247949, 89.91006780247949, 0], [0], [25000000000003-136.,89.91006780247949, 0]. [130.62500000000003, 89.91006780247949, 0], [125.00000000000001, 89.91006780247949, 0]. [119.37500000000003, 89.91006780247949, 0], [113.75, 89.91006780247949, 0], [108.12500000000003, 89.91006780247949, 0], [- 102. 50000000000006,89.91006780247949, 0], [96.87500000000001, 89.91006780247949, 0], [91.25000000000004, 89.91006780247949, 0], [... 85.625, 89.91006780247949, 0], [80.00000000000001, 89.91006780247949, 0], [74.37500000000003, 89.91006780247949, 0], [68.75, 89.91006780247949, 0], [63.125000000000014, 89.91006780247949, 0], [57.4999999999986,89.91006780247949, 0], [51.875000000000 01,89.91006780247949, 0], [46.250000000000036, 40.62499999999999, 89.91006780247949, 89.91006780247949, 0], [0], [35.00000000 000003,89.91006780247949, 0]. [29.375000000000032, 89.91006780247949, 0], [23.75, 89.91006780247949, 0], [18.125000000000018, 89.91006780247949, 0], [12.500000000000039, 89.91006780247949, 0], [6.87500000000001, 89.91006780247949, 0], [1.2500000000000 278,89.91006780247949, 0], [4.375000000000006, 89.91006780247949, 0], [9.999999999999986, 89.91006780247949, 0] ]
An error occurs when using h3.polygonToCells(coordinates, null, 5) on the north and south poles Coordinates for the [[9.999999999999998, 89.91006780247949, 0], [15.624999999999998, 89.91006780247949, 0], [21.25, 89.91006780247949, 0 ], [26.874999999999996, 89.91006780247949, 0], [32.5, 89.91006780247949, 0], [38.12499999999999, 89.91006780247949, 0], [43.750000 00000001,89.91006780247949, 0], [49.37499999999999, 89.91006780247949, 0], [54.99999999999999, 89.91006780247949, 0], [60.625, 89 . 91006780247949, 0], [66.25, 89.91006780247949, 0], [71.875, 89.91006780247949, 0], [77.5, 89.91006780247949, 0], [83.125, 89.910067 80247949, 0], [88.75, 89.91006780247949, 0], [94.37499999999999, 89.91006780247949, 0], [100.0, 89.91006780247949, 0], [105.625, 89. 91006780247949, 0], [111.25000000000001, 89.91006780247949, 0], [116.87499999999999, 89.91006780247949, 0], [122.50000000000001, 128.125, 89.91006780247949, 89.91006780247949, 0], [0], [133.74999999999997, 89.91006780247949, 0], [139.375, 89.91006780247949, 0 ], [145.0, 89.91006780247949, 0], [150.62500000000003, 89.91006780247949, 0], [156.25, 89.91006780247949, 0], [161.87499999999997, 167.5, 89.91006780247949, 89.91006780247949, 0], [0], [173.125, 89.91006780247949, 0], [178.74999999999997, 89.91006780247949, 0]. [175.62500000000003, 89.91006780247949, 0], [170.0, 89.91006780247949, 0], [164.375, 89.91006780247949, 0], [158.75, 89.910067 80247949, 0], [153.12500000000003, 89.91006780247949, 0], [147.5, 89.91006780247949, 0], [141.875, 89.91006780247949, 0], [- 136. 25000000000003,89.91006780247949, 0], [130.62500000000003, 89.91006780247949, 0], [125.00000000000001, 89.91006780247949, 0]. [119.37500000000003, 89.91006780247949, 0], [113.75, 89.91006780247949, 0], [108.12500000000003, 89.91006780247949, 0], [- 102. 50000000000006,89.91006780247949, 0], [96.87500000000001, 89.91006780247949, 0], [91.25000000000004, 89.91006780247949, 0], [... 85.625, 89.91006780247949, 0], [80.00000000000001, 89.91006780247949, 0], [74.37500000000003, 89.91006780247949, 0], [68.75, 89 . 91006780247949, 0], [63.125000000000014, 89.91006780247949, 0], [57.499999999999986, 89.91006780247949, 0], [51.875000000000 01,89.91006780247949, 0], [46.250000000000036, 89.91006780247949, 0], [40.62499999999999, 89.91006780247949, 0], [35.00000000 000003,89.91006780247949, 0], [29.375000000000032, 89.91006780247949, 0], [23.75, 89.91006780247949, 0], [18.125000000000018, 89.91006780247949, 0], [12.500000000000039, 89.91006780247949, 0], [6.87500000000001, 89.91006780247949, 0], [1.2500000000000 278,89.91006780247949, 0], [4.375000000000006, 89.91006780247949, 0], [9.999999999999986, 89.91006780247949, 0], com. Uber. H3core .exceptions.H3Exception: The operation failed but a more specific error is not available ]