public static TileWeights readFromFile(Path path) {
    try (var fileStream = new GZIPInputStream(new BufferedInputStream(Files.newInputStream(path)))) {
      var result = readFrom(fileStream);
      if (!result.weights.isEmpty()) {
        return result;
      }
    } catch (IOException | RuntimeJsonMappingException e) {
      LOGGER.info("Unable to load tile weights from {}, falling back to top 100k", path);
    }

    try (var resourceStream = TileWeights.class.getResourceAsStream("/top_50k_osm_tiles.tsv")) {
      return readFrom(resourceStream);
    } catch (IOException e) {
      LOGGER.warn("Unable to load top 100k tile weights, falling back to unweighted average", e);
      return new TileWeights();
    }
  }
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