Skip to content

Commit

Permalink
Remove debug output, fix XML test
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Dec 4, 2023
1 parent 6a4f80a commit d45d8cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,17 @@ private boolean isTopologyValid(TaggedLineString line,
int sectionStart, int sectionEnd,
LineSegment candidateSeg)
{
System.out.println("Flattening candidate: " + candidateSeg);
if (hasOutputIntersection(candidateSeg))
return false;
if (hasInputIntersection(line, sectionStart, sectionEnd, candidateSeg))
return false;
if (jumpChecker.hasJump(line, sectionStart, sectionEnd, candidateSeg))
return false;
System.out.println("OK TO FLATTEN\n\n");
return true;
}

private boolean isTopologyValid(TaggedLineString line2, LineSegment seg1, LineSegment seg2,
private boolean isTopologyValid(TaggedLineString line, LineSegment seg1, LineSegment seg2,
LineSegment candidateSeg) {
System.out.println("Flattening candidate: " + candidateSeg);
if (hasOutputIntersection(candidateSeg))
return false;
//-- if segments are already flat, topology is unchanged and so valid
Expand All @@ -231,7 +228,6 @@ private boolean isTopologyValid(TaggedLineString line2, LineSegment seg1, LineSe
return false;
if (jumpChecker.hasJump(line, seg1, seg2, candidateSeg))
return false;
System.out.println("OK TO FLATTEN\n\n");
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@
<case>
<desc>A - polygon with small hole near simplified edge
DP: hole is remmoved
TP: hole is skipped over - BUG!
TP: hole is preserved
</desc>
<a> POLYGON ((10 10, 10 80, 50 90, 90 80, 90 10, 10 10), (70 81, 30 81, 50 90, 70 81))
</a>
<test> <op name="simplifyDP" arg1="A" arg2="10">
POLYGON ((10 10, 10 80, 90 80, 90 10, 10 10))
</op> </test>
<test> <op name="simplifyTP" arg1="A" arg2="10">
POLYGON ((10 10, 10 80, 90 80, 90 10, 10 10), (70 81, 30 81, 50 90, 70 81))
POLYGON ((10 10, 10 80, 50 90, 90 80, 90 10, 10 10), (70 81, 30 81, 50 90, 70 81))
</op> </test>
</case>

Expand Down

0 comments on commit d45d8cc

Please sign in to comment.