geolith_tiles_builder/raster/
mod.rs1pub mod archive;
10pub mod cache;
11pub mod fetch;
12pub mod pyramid;
13pub mod template;
14
15pub use archive::{RasterBuildOptions, RasterBuildStats, build_raster_archive};
16pub use fetch::HttpFetcher;
17pub use pyramid::PyramidSpec;
18pub use template::UrlTemplate;
19
20pub fn run(options: &RasterBuildOptions, output: &std::path::Path) -> anyhow::Result<()> {
27 let total = options.pyramid.count();
28 tracing::info!(
29 tiles = total,
30 min_zoom = options.pyramid.min_zoom,
31 max_zoom = options.pyramid.max_zoom,
32 concurrency = options.concurrency,
33 cache = %options.cache_dir.display(),
34 "raster archive build starting"
35 );
36
37 let fetcher = HttpFetcher::new();
38 let stats = build_raster_archive(&fetcher, options, output)?;
39 tracing::info!(
40 output = %output.display(),
41 downloaded = stats.downloaded,
42 cached = stats.cached,
43 missing = stats.missing,
44 tiles = stats.tiles_written,
45 unique = stats.unique_tiles,
46 "raster archive written"
47 );
48 Ok(())
49}