Skip to content

Commit

Permalink
Improve DPSimplifierTest
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Nov 7, 2023
1 parent 03f3ac7 commit 8e76883
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,30 @@ public void testPolygonReduction() {
}

public void testPolygonWithTouchingHole() {
checkDP("POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200), (120 120, 220 120, 180 199, 160 200, 140 199, 120 120))",
checkDP("POLYGON ((10 10, 10 90, 90 90, 90 10, 10 10), (80 20, 20 20, 20 80, 50 90, 80 80, 80 20))",
10,
"POLYGON ((80 200, 240 200, 240 60, 80 60, 80 200), (120 120, 220 120, 180 199, 160 200, 140 199, 120 120))");
"POLYGON ((10 10, 10 90, 90 90, 90 10, 10 10), (80 20, 20 20, 20 80, 80 80, 80 20))");
}
public void testFlattishPolygon() {

public void testPolygonFlattish() {
checkDP("POLYGON ((0 0, 50 0, 53 0, 55 0, 100 0, 70 1, 60 1, 50 1, 40 1, 0 0))",
10,
"POLYGON EMPTY");
}

public void testTinySquare() {
public void testPolygonTinySquare() {
checkDP("POLYGON ((0 5, 5 5, 5 0, 0 0, 0 1, 0 5))",
10,
"POLYGON EMPTY");
}

public void testTinyHole() {
public void testPolygonTinyHole() {
checkDP("POLYGON ((10 10, 10 310, 370 310, 370 10, 10 10), (160 190, 180 190, 180 170, 160 190))",
30,
"POLYGON ((10 10, 10 310, 370 310, 370 10, 10 10))");
}

public void testTinyLineString() {
public void testLineStringTiny() {
checkDP("LINESTRING (0 5, 1 5, 2 5, 5 5)",
10,
"LINESTRING (0 5, 5 5)");
Expand Down

0 comments on commit 8e76883

Please sign in to comment.