diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2026-04-05 16:58:13 +0200 |
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2026-04-05 16:58:13 +0200 |
| commit | f6f5f3c42545a1beb15e93bc29d405c601fe106a (patch) | |
| tree | 42097d340171d0a8a4c3f5d43cddd57b3af6a217 /hittekaart-cli | |
| parent | f20581dea3ef7f20d177e227109b95f93c1d6041 (diff) | |
| download | hittekaart-f6f5f3c42545a1beb15e93bc29d405c601fe106a.tar.gz hittekaart-f6f5f3c42545a1beb15e93bc29d405c601fe106a.tar.bz2 hittekaart-f6f5f3c42545a1beb15e93bc29d405c601fe106a.zip | |
implement mb-tiles output format
Diffstat (limited to 'hittekaart-cli')
| -rw-r--r-- | hittekaart-cli/src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hittekaart-cli/src/main.rs b/hittekaart-cli/src/main.rs index 880ea61..944a4da 100644 --- a/hittekaart-cli/src/main.rs +++ b/hittekaart-cli/src/main.rs @@ -8,7 +8,7 @@ use color_eyre::{ use hittekaart::{ gpx::{self, Compression}, renderer::{self, Renderer, heatmap, marktile, tilehunt}, - storage::{Folder, Sqlite, Storage, TableFormat}, + storage::{Folder, MbTiles, OsmAnd, Storage}, }; use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle}; use is_terminal::IsTerminal; @@ -29,8 +29,8 @@ enum Mode { #[derive(ValueEnum, Debug, Clone, Copy, PartialEq, Eq, Hash)] enum Format { Folder, - Sqlite, OsmAnd, + MbTiles, } #[derive(Parser, Debug, Clone)] @@ -127,13 +127,13 @@ fn run<R: Renderer>(renderer: R, args: Args) -> Result<()> { let output = args.output.unwrap_or_else(|| "tiles".into()); Box::new(Folder::new(output)) } - Format::Sqlite => { - let output = args.output.unwrap_or_else(|| "tiles.sqlite".into()); - Box::new(Sqlite::connect(output, TableFormat::Simple)?) + Format::MbTiles => { + let output = args.output.unwrap_or_else(|| "tiles.mbtiles".into()); + Box::new(MbTiles::open(output)?) } Format::OsmAnd => { let output = args.output.unwrap_or_else(|| "tiles.sqlitedb".into()); - Box::new(Sqlite::connect(output, TableFormat::OsmAnd)?) + Box::new(OsmAnd::open(output)?) } }; storage.prepare()?; |
