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(
27 options: &RasterBuildOptions,
28 output: &std::path::Path,
29) -> Result<(), crate::TilesError> {
30 let total = options.pyramid.count();
31 tracing::info!(
32 tiles = total,
33 min_zoom = options.pyramid.min_zoom,
34 max_zoom = options.pyramid.max_zoom,
35 concurrency = options.concurrency,
36 cache = %options.cache_dir.display(),
37 "raster archive build starting"
38 );
39
40 let fetcher = HttpFetcher::new();
41 let stats = build_raster_archive(&fetcher, options, output)?;
42 tracing::info!(
43 output = %output.display(),
44 downloaded = stats.downloaded,
45 cached = stats.cached,
46 missing = stats.missing,
47 tiles = stats.tiles_written,
48 unique = stats.unique_tiles,
49 "raster archive written"
50 );
51 Ok(())
52}