public List<Partial<T>> result() {
    List<Partial<T>> result = new ArrayList<>();
    for (var entry : items.asMapOfRanges().entrySet()) {
      result.add(new Partial<>(entry.getKey().lowerEndpoint(), entry.getKey().upperEndpoint(), entry.getValue()));
    }
    return result;
  }
Returns the distinct set of ranges and their values where adjacent maps with identical values are merged.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/MergingRangeMap.java