aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-03-11 19:57:18 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-03-11 19:57:18 +0100
commitfd4f3318db8df3e9f0542535fb7df6d621d07768 (patch)
treea7266db8f159d3cd7a487bc7eb80f3fcb2dd807d /src/main.rs
parent4e8ce5bbaf5aa71f7e00e7a131fc6b25e623c992 (diff)
downloadhittekaart-fd4f3318db8df3e9f0542535fb7df6d621d07768.tar.gz
hittekaart-fd4f3318db8df3e9f0542535fb7df6d621d07768.tar.bz2
hittekaart-fd4f3318db8df3e9f0542535fb7df6d621d07768.zip
first implementation of tile hunter mode
This is a very basic idea, the downside is that you basically cannot "fix" the tilehunt overlay to a specific zoom level. It might be nice to get a second renderer that renders the tile hunt for a fixed zoom, and then adjusts the output tiles accordingly (then it also takes more space again though).
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 6c110e2..7f7c532 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,7 +7,7 @@ use color_eyre::{
};
use hittekaart::{
gpx::{self, Compression},
- renderer::{self, heatmap, Renderer},
+ renderer::{self, heatmap, tilehunt, Renderer},
storage::{Folder, Sqlite, Storage},
};
use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle};
@@ -71,7 +71,10 @@ fn main() -> Result<()> {
.num_threads(args.threads)
.build_global()?;
- run::<heatmap::Renderer>(args)
+ match args.mode {
+ Mode::Heatmap => run::<heatmap::Renderer>(args),
+ Mode::Tilehunt => run::<tilehunt::Renderer>(args),
+ }
}
fn run<R: Renderer>(args: Args) -> Result<()> {