-
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start a tool to compress Map files by removing information unnecessar…
…y to the bike network tool. #746 Just a modest start, switching from CHs to Dijkstra's for pathfinding. Not uploading the minified result yet.
- Loading branch information
1 parent
1c756be
commit f831681
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//! Removes nonessential parts of a Map, for the bike network tool. | ||
use abstutil::{CmdArgs, Timer}; | ||
use map_model::Map; | ||
|
||
fn main() { | ||
let mut args = CmdArgs::new(); | ||
let mut timer = Timer::new("minify map"); | ||
let mut map = Map::load_synchronously(args.required_free(), &mut timer); | ||
args.done(); | ||
|
||
map.minify(&mut timer); | ||
// This also changes the name, so this won't overwrite anything | ||
map.save(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters