Skip to content

Make segintersector.isDone() default to false#1136

Merged
dr-jts merged 1 commit intolocationtech:masterfrom
micycle1:seg_intersector
Jun 2, 2025
Merged

Make segintersector.isDone() default to false#1136
dr-jts merged 1 commit intolocationtech:masterfrom
micycle1:seg_intersector

Conversation

@micycle1
Copy link
Contributor

@micycle1 micycle1 commented Jun 2, 2025

Give the SegmentIntersector interface's isDone() method a default value of false.

This way one can process all intersections cleanly with a lambda (rather than inner class that must implement both processIntersections() and isDone().

mci.process(segmentStringsB, (e0, segIndex0, e1, segIndex1) -> {
    sid.processIntersections(e0, segIndex0, e1, segIndex1);
    if (sid.hasIntersection()) {
    	// do
    }
});

@micycle1 micycle1 changed the title make segintersector.isDone() default=false Make segintersector.isDone() default to false Jun 2, 2025
@dr-jts
Copy link
Contributor

dr-jts commented Jun 2, 2025

Looks good. If this is done I'll merge.

@micycle1
Copy link
Contributor Author

micycle1 commented Jun 2, 2025

Done from me.

@dr-jts dr-jts merged commit cfc074b into locationtech:master Jun 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants