private void simplify() {
    List<Edge> toRemove = new ArrayList<>();
    for (var node : output) {
      for (var edge : node.getEdges()) {
        if (edge.main) {
          edge.simplify();
          if (edge.isCollapsed()) {
            toRemove.add(edge);
          }
        }
      }
    }
    toRemove.forEach(Edge::remove);
  }
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