Skip to content

Commit

Permalink
Tests for collinear edges
Browse files Browse the repository at this point in the history
Signed-off-by: tanelk <[email protected]>
  • Loading branch information
tanelk committed Mar 18, 2024
1 parent 1df695e commit 59cf246
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,20 @@ public void testVertexIntersectionOnEdge2() {
"POLYGON ((40 10, 20 30, 40 50, 50 30, 40 10))");
}

public void testCollinearOverlappingEdgesPartial() {
checkIntersectionAreaSymmetric(
"POLYGON ((10 30, 30 30, 30 10, 10 10, 10 30))",
"POLYGON ((20 30, 40 30, 40 10, 20 10, 20 30))"
);
}

public void testCollinearOverlappingEdgesFull() {
checkIntersectionAreaSymmetric(
"POLYGON ((10 30, 50 30, 50 10, 10 10, 10 30))",
"POLYGON ((20 30, 40 30, 40 10, 20 10, 20 30))"
);
}

protected final void checkIntersectionArea(String wktA, String wktB) {
Geometry a = read(wktA);
Geometry b = read(wktB);
Expand Down

0 comments on commit 59cf246

Please sign in to comment.