private void degreeTwoMerge() {
    for (var node : output) {
      degreeTwoMerge(node);
    }
    output.removeIf(node -> node.getEdges().isEmpty());
    assert valid();
  }
Adds a geometry to the merger. Only linestrings from the input geometry are considered.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/LoopLineMerger.java