public static void main(String[] args) throws IOException {
    Arguments arguments = Arguments.fromArgsOrConfigFile(args).orElse(Arguments.of(Map.of(
      "http-retries", "3"
    )));
    var config = PlanetilerConfig.from(arguments);
    var stats = arguments.getStats();
    var days = arguments.getInteger("days", "number of days into the past to look", 90);
    var maxZoom = arguments.getInteger("maxzoom", "max zoom", 15);
    var topN = arguments.getInteger("top", "top n", 1_000_000);
    var output = arguments.file("output", "output", Path.of("top_osm_tiles.tsv.gz"));
    var threads = arguments.getInteger("download-threads", "number of threads to use for downloading/parsing",
      Math.min(10, arguments.threads()));

    var date = LocalDate.now(ZoneOffset.UTC);
    var toDownload = IntStream.range(0, days)
      .mapToObj(i -> date.minus(Period.ofDays(i)))
      .toList();

    new TopOsmTiles(config, stats)
      .run(threads, topN, maxZoom, toDownload)
      .writeToFile(output);
  }
A utility for computing {@link TileWeights} from historic openstreetmap.org tile traffic.
<p>
To download raw data from OSM tile logs, run with:

<pre>
{@code
java -jar planetiler.jar top-osm-tiles --days=<# days to fetch> --top=<# tiles to include> --output=output.tsv.gz
}
</pre>
<p>
You can also fetch precomputed top-1m tile stats from summer 2023 using
{@link #downloadPrecomputed(PlanetilerConfig)}
planetiler-core/src/main/java/com/onthegomap/planetiler/util/TopOsmTiles.java