Crates.io | osm-tile-downloader |
lib.rs | osm-tile-downloader |
version | 0.2.5 |
source | src |
created_at | 2019-10-09 10:55:56.464853 |
updated_at | 2020-05-26 21:17:40.64266 |
description | Download tiles from an OpenStreetMap tileserver to the file system |
homepage | |
repository | https://github.com/NeoLegends/osm-tile-downloader |
max_upload_size | |
id | 171172 |
size | 81,080 |
Download OpenStreetMap-tiles to your disk en-masse.
Use with absolute caution. Downloading tiles en-masse can hog down a tile server easily. I am not responsible for any damage this tool may cause.
This tool is available on crates.io and can be
installed via cargo install osm-tile-downloader
. It features a helpful
CLI you can access via -h
/ --help
.
It is also available as a library.
osm-tile-downloader \
--north 50.811 \
--east 6.1649 \
--south 50.7492 \
--west 6.031 \
--url https://\{s\}.tile.openstreetmap.de/\{z\}/\{x\}/\{y\}.png \
--output ./tiles \
--rate 10
use osm_tile_downloader::{fetch, BoundingBox, Config};
use std::path::Path;
let config = Config {
bounding_box: BoundingBox::new_deg(50.811, 6.1649, 50.7492, 6.031),
fetch_rate: 10,
output_folder: Path::new("./tiles"),
request_retries_amount: 3,
url: "https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",
timeout_secs: 30,
zoom_level: 10,
};
fetch(config).await.expect("failed fetching tiles");
License: MIT