private static TileWeights readFrom(InputStream input) throws IOException {
    if (input == null) {
      throw new IOException("No input provided");
    }
    TileWeights result = new TileWeights();
    try (var reader = READER.<Row>readValues(input)) {
      while (reader.hasNext()) {
        var row = reader.next();
        if (row.z >= PlanetilerConfig.MIN_MINZOOM && row.z <= PlanetilerConfig.MAX_MAXZOOM) {
          int x = row.x % (1 << row.z);
          int y = row.y % (1 << row.z);
          result.put(TileCoord.ofXYZ(x, y, row.z()), row.loads());
        }
      }
    }
    return result;
  }
Load tile weights from a gzipped TSV file with {@code z, x, y, loads} columns.
<p>
Duplicate entries will be added together. If the file is missing, will fall back to embedded file with top 50k OSM
tiles.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/TileWeights.java