private static int quantizeUp(double value, int levels) {
    return Math.clamp((int) Math.ceil(value * levels), 0, levels);
  }
A function that filters to only tile coordinates that overlap a given {@link Envelope}.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/TileExtents.java