iverase commented on code in PR #946: URL: https://github.com/apache/lucene/pull/946#discussion_r892379156
########## lucene/core/src/java/org/apache/lucene/geo/Tessellator.java: ########## @@ -131,16 +136,24 @@ public static List<Triangle> tessellate(final Polygon polygon, boolean checkSelf } // Calculate the tessellation using the doubly LinkedList. List<Triangle> result = - earcutLinkedList(polygon, outerNode, new ArrayList<>(), State.INIT, mortonOptimized); + earcutLinkedList( + polygon, outerNode, new ArrayList<>(), State.INIT, mortonOptimized, monitor, 0); if (result.size() == 0) { + notifyMonitor("FAILED", monitor, null, result); Review Comment: Shall we extract static strings instead for FAILED, COMPLETED, ...? ########## lucene/core/src/java/org/apache/lucene/geo/Tessellator.java: ########## @@ -817,8 +841,12 @@ private static final boolean splitEarcut( sortByMortonWithReset(searchNode); sortByMortonWithReset(splitNode); } - earcutLinkedList(polygon, searchNode, tessellation, State.INIT, mortonOptimized); - earcutLinkedList(polygon, splitNode, tessellation, State.INIT, mortonOptimized); + notifyMonitorSplit("SPLIT[" + depth + "]", monitor, searchNode, splitNode); + earcutLinkedList( + polygon, searchNode, tessellation, State.INIT, mortonOptimized, monitor, depth); + earcutLinkedList( + polygon, splitNode, tessellation, State.INIT, mortonOptimized, monitor, depth); + notifyMonitorSplitEnd("SPLIT[" + depth + "]", monitor); Review Comment: same here ########## lucene/core/src/java/org/apache/lucene/geo/Tessellator.java: ########## @@ -1444,6 +1472,60 @@ public static final boolean pointInPolygon( return false; } + /** + * Implementation of this interface will receive calls with internal data at each step of the + * triangulation algoirithm. This is of use for debugging complex cases, as well as gaining Review Comment: s/algoirithm/algorithm -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org