Skip to content

Commit

Permalink
Update planetiler-core/src/main/java/com/onthegomap/planetiler/util/L…
Browse files Browse the repository at this point in the history
…oopLineMerger.java

Co-authored-by: Michael Barry <[email protected]>
  • Loading branch information
wipfli and msbarry authored Nov 22, 2024
1 parent d7e4b03 commit 1257538
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ private Edge degreeTwoMerge(Node node) {
return null;
}

private Edge mergeTwoEdges(Node node, Edge a, Edge b) {
private Edge mergeTwoEdges(Node node, Edge edge1, Edge edge2) {
// attempt to preserve segment directions from the original line
// when: A << N -- B then output C reversed from B to A
// when: A >> N -- B then output C from A to B
Edge a = edge1.main ? edge2 : edge1;
Edge b = edge1.main ? edge1 : edge2;
node.getEdges().remove(a);
node.getEdges().remove(b);
List<Coordinate> coordinates = new ArrayList<>();
Expand Down

0 comments on commit 1257538

Please sign in to comment.