#tile #download #downloader #map #rectangle #progress-bar #server

app tile-downloader

Download all map tiles in a given lat/lon rectangle

1 unstable release

0.1.0 Feb 19, 2024

#180 in Geospatial

MIT license

140KB
136 lines

Tile Downloader

Downloads tiles from a tile server (OSM, etc.) and stores them locally. Then, you can point a web server at that directory and use it as an offline tile server!

Usage

Download all of New Brunswick (the province), at zoom levels 0-16 to output:

cargo run --release -- -a 47.1225 -A 45.3367 -o -67.7307 -O -65.105 -z 0 -Z 16 --tile-server "https://map.scd31.com/hot/{z}/{x}/{y}.png" -n 8 --output output/

For command info, see cargo run --release --help

(And no, it doesn't matter which lat/lon is the minimum and which is the maximum)

Features

  • A pretty status bar to view your progress

  • Skips already-downloaded files (therefore it's safe to kill the downloader and restart it - it will only download new files)

  • High performance - will happily download hundreds of thousands of tiles without skipping a beat (don't do this without permission though!)

Dependencies

~10–22MB
~312K SLoC