static <T> ZoomFunction<T> fromMaxZoomThresholds(Map<Integer, ? extends T> thresholds, T defaultValue) {
    TreeMap<Integer, T> orderedMap = new TreeMap<>(thresholds);
    orderedMap.put(Integer.MAX_VALUE, defaultValue);
    return zoom -> orderedMap.ceilingEntry(zoom).getValue();
  }
Returns a zoom function that returns the value from the next higher key in {@code thresholds} or {@code
defaultValue}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/ZoomFunction.java