mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 12:12:00 +03:00
start playing around with manchester
This commit is contained in:
parent
90b556ac1f
commit
455b17faef
13
data/other_polygons/manchester.poly
Normal file
13
data/other_polygons/manchester.poly
Normal file
@ -0,0 +1,13 @@
|
||||
manchester
|
||||
1
|
||||
-2.2376060485839844 53.492079751245775
|
||||
-2.2594070434570312 53.4881987411108
|
||||
-2.2638702392578125 53.48038457774244
|
||||
-2.2662734985351562 53.47139395589252
|
||||
-2.2550296783447266 53.46592713537304
|
||||
-2.234172821044922 53.46771542518253
|
||||
-2.2224998474121094 53.47231353875611
|
||||
-2.2232723236083984 53.48370449621052
|
||||
-2.2376060485839844 53.492079751245775
|
||||
END
|
||||
END
|
@ -19,6 +19,9 @@ If you have an Osmosis polygon filter (see below), you can also pass
|
||||
first make sure your .osm has been clipped:
|
||||
`osmconvert large_map.osm -B=clipping.poly --complete-ways -o=smaller_map.osm`.
|
||||
|
||||
You can also try `--oneshot_drive_on_left`, but you'll spot some bugs. Get in
|
||||
touch if you need these fixed soon or want to help.
|
||||
|
||||
## Including the city by default
|
||||
|
||||
1. Make sure you can run `import.sh` -- see
|
||||
|
@ -19,6 +19,7 @@ struct Job {
|
||||
|
||||
oneshot: Option<String>,
|
||||
oneshot_clip: Option<String>,
|
||||
oneshot_drive_on_left: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
@ -44,6 +45,7 @@ fn main() {
|
||||
// Ignore other arguments and just convert the given .osm file to a Map.
|
||||
oneshot: args.optional("--oneshot"),
|
||||
oneshot_clip: args.optional("--oneshot_clip"),
|
||||
oneshot_drive_on_left: args.enabled("--oneshot_drive_on_left"),
|
||||
};
|
||||
args.done();
|
||||
if !job.osm_to_raw
|
||||
@ -60,7 +62,7 @@ fn main() {
|
||||
}
|
||||
|
||||
if let Some(path) = job.oneshot {
|
||||
oneshot(path, job.oneshot_clip);
|
||||
oneshot(path, job.oneshot_clip, !job.oneshot_drive_on_left);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -147,7 +149,7 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
fn oneshot(osm_path: String, clip: Option<String>) {
|
||||
fn oneshot(osm_path: String, clip: Option<String>, drive_on_right: bool) {
|
||||
let mut timer = abstutil::Timer::new("oneshot");
|
||||
println!("- Running convert_osm on {}", osm_path);
|
||||
let name = abstutil::basename(&osm_path);
|
||||
@ -164,7 +166,7 @@ fn oneshot(osm_path: String, clip: Option<String>) {
|
||||
gtfs: None,
|
||||
elevation: None,
|
||||
clip,
|
||||
drive_on_right: true,
|
||||
drive_on_right,
|
||||
},
|
||||
&mut timer,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user