mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 01:15:12 +03:00
Also organize screenshots by city. #326
This commit is contained in:
parent
cda586dfc9
commit
3d84defb71
14
.gitignore
vendored
14
.gitignore
vendored
@ -4,39 +4,29 @@ __pycache__
|
||||
|
||||
data/config
|
||||
|
||||
data/input/berlin/osm
|
||||
data/input/berlin/planning_areas.bin
|
||||
data/input/berlin/planning_areas.kml
|
||||
data/input/berlin/EWR201812E_Matrix.csv
|
||||
|
||||
data/input/krakow/osm
|
||||
data/input/leeds/osm
|
||||
|
||||
data/input/london/osm
|
||||
|
||||
data/input/seattle/blockface.bin
|
||||
data/input/seattle/blockface.kml
|
||||
data/input/seattle/google_transit
|
||||
data/input/seattle/N47W122.hgt
|
||||
data/input/seattle/offstreet_parking.bin
|
||||
data/input/seattle/offstreet_parking.kml
|
||||
data/input/seattle/osm
|
||||
data/input/seattle/parcels.bin
|
||||
data/input/seattle/parcels_urbansim.txt
|
||||
data/input/seattle/popdat.bin
|
||||
data/input/seattle/trips_2014.csv
|
||||
|
||||
data/input/tel_aviv/osm
|
||||
|
||||
data/input/xian/osm
|
||||
|
||||
data/input/*/osm
|
||||
data/input/*/footways.bin
|
||||
data/input/*/service_roads.bin
|
||||
data/input/*/*_separate_cycleways.bin
|
||||
data/input/*/*_snapped_cycleways.bin
|
||||
data/input/*/screenshots/*.zip
|
||||
|
||||
data/input/raw_maps
|
||||
data/input/screenshots/*.zip
|
||||
|
||||
data/player
|
||||
|
||||
|
@ -40,6 +40,10 @@
|
||||
"checksum": "9505917bbacc478177e36605e89b6d77",
|
||||
"size_bytes": 117776270
|
||||
},
|
||||
"data/input/krakow/screenshots/krakow_center.zip": {
|
||||
"checksum": "c176076e6f60f03741ca44b0bfdf8545",
|
||||
"size_bytes": 14238180
|
||||
},
|
||||
"data/input/krakow/service_roads.bin": {
|
||||
"checksum": "a702f4fa6680793c7e1047668d8d0b69",
|
||||
"size_bytes": 421094
|
||||
@ -72,6 +76,10 @@
|
||||
"checksum": "b86babace41d69a9e5b8be2310a725ae",
|
||||
"size_bytes": 18059372
|
||||
},
|
||||
"data/input/london/screenshots/southbank.zip": {
|
||||
"checksum": "6a8b17f4f8abf68a3e7248bffc59a455",
|
||||
"size_bytes": 3936498
|
||||
},
|
||||
"data/input/london/service_roads.bin": {
|
||||
"checksum": "4f651a450d9d6b73618db015c34a03ad",
|
||||
"size_bytes": 99666
|
||||
@ -132,30 +140,6 @@
|
||||
"checksum": "944535618cda403d0613ed485ef18072",
|
||||
"size_bytes": 12038513
|
||||
},
|
||||
"data/input/screenshots/downtown.zip": {
|
||||
"checksum": "0f6281f4a154cf33e7d8e0622a10f892",
|
||||
"size_bytes": 14846427
|
||||
},
|
||||
"data/input/screenshots/krakow_center.zip": {
|
||||
"checksum": "1aa1db83e194651a917e230c70ae897d",
|
||||
"size_bytes": 14244236
|
||||
},
|
||||
"data/input/screenshots/lakeslice.zip": {
|
||||
"checksum": "cec91a0f2786dedc250e70c7d50dd42e",
|
||||
"size_bytes": 13560905
|
||||
},
|
||||
"data/input/screenshots/montlake.zip": {
|
||||
"checksum": "2163547c4b4f7c4ed32397c1d9bd7d0d",
|
||||
"size_bytes": 2626368
|
||||
},
|
||||
"data/input/screenshots/southbank.zip": {
|
||||
"checksum": "b36aa4257d3fa625284b835e8e2c27b5",
|
||||
"size_bytes": 3938034
|
||||
},
|
||||
"data/input/screenshots/udistrict.zip": {
|
||||
"checksum": "e45711495e86f8f7df6c2a3252fa3aef",
|
||||
"size_bytes": 6794090
|
||||
},
|
||||
"data/input/seattle/N47W122.hgt": {
|
||||
"checksum": "0db4e23e51f7680538b0bbbc72208e07",
|
||||
"size_bytes": 25934402
|
||||
@ -276,6 +260,22 @@
|
||||
"checksum": "592592ec7bd0dadc7b09ee96a4d086a7",
|
||||
"size_bytes": 430666022
|
||||
},
|
||||
"data/input/seattle/screenshots/downtown.zip": {
|
||||
"checksum": "4552a34fffb0c47b121f532d882964e8",
|
||||
"size_bytes": 14841175
|
||||
},
|
||||
"data/input/seattle/screenshots/lakeslice.zip": {
|
||||
"checksum": "9d2fb224f4be434404a46a0004274bff",
|
||||
"size_bytes": 13555629
|
||||
},
|
||||
"data/input/seattle/screenshots/montlake.zip": {
|
||||
"checksum": "366d6ee503a070d3c03eab16bb94accd",
|
||||
"size_bytes": 2625400
|
||||
},
|
||||
"data/input/seattle/screenshots/udistrict.zip": {
|
||||
"checksum": "4e0a2e2a756de90b187367d71b16f06c",
|
||||
"size_bytes": 6791102
|
||||
},
|
||||
"data/input/seattle/service_roads.bin": {
|
||||
"checksum": "550f1e72408b63781596ec26b6daa1d0",
|
||||
"size_bytes": 3787291
|
||||
|
@ -1,13 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
name=$1;
|
||||
city=$1;
|
||||
map=$2;
|
||||
|
||||
mkdir screens_before;
|
||||
cd screens_before;
|
||||
unzip ../../data/input/screenshots/${name}.zip;
|
||||
unzip ../../data/input/${city}/screenshots/${map}.zip;
|
||||
cd ..;
|
||||
before=screens_before/screenshots_${name};
|
||||
after=screenshots_${name};
|
||||
before=screens_before;
|
||||
after=screenshots/${city}/${map};
|
||||
|
||||
rm -rf diff
|
||||
mkdir diff
|
||||
|
@ -1,8 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
name=$1;
|
||||
city=$1;
|
||||
map=$2;
|
||||
|
||||
rm -rf ../data/input/screenshots/${name}.zip diff screens_before;
|
||||
zip -r $name screenshots_${name};
|
||||
mv ${name}.zip ../data/input/screenshots/;
|
||||
rm -rf screenshots_${name};
|
||||
rm -rf ../data/input/${city}/screenshots/${map}.zip diff screens_before;
|
||||
cd screenshots/${city}/${map};
|
||||
zip ${map}.zip *;
|
||||
mv ${map}.zip ../../../../data/input/${city}/screenshots/;
|
||||
cd ../../../;
|
||||
rm -rf screenshots/${city}/${map};
|
||||
|
@ -776,8 +776,9 @@ impl State<App> for ScreenshotTest {
|
||||
fn screenshot_everything(ctx: &mut EventCtx, app: &App) {
|
||||
let bounds = app.primary.map.get_bounds();
|
||||
assert!(bounds.min_x == 0.0 && bounds.min_y == 0.0);
|
||||
let name = app.primary.map.get_name();
|
||||
ctx.request_update(UpdateType::ScreenCaptureEverything {
|
||||
dir: format!("screenshots_{}", app.primary.map.get_name().as_filename()),
|
||||
dir: format!("screenshots/{}/{}", name.city, name.map),
|
||||
zoom: 3.0,
|
||||
max_x: bounds.max_x,
|
||||
max_y: bounds.max_y,
|
||||
|
@ -236,16 +236,6 @@ fn filter_manifest(mut manifest: Manifest, cities: Cities) -> Manifest {
|
||||
|
||||
let parts = path.split("/").collect::<Vec<_>>();
|
||||
if parts[1] == "input" {
|
||||
if parts[2] == "screenshots" {
|
||||
let map = parts[3].trim_end_matches(".zip");
|
||||
if cities
|
||||
.input
|
||||
.iter()
|
||||
.any(|city| map_belongs_to_city(map, city))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if parts[2] == "raw_maps" {
|
||||
let map = parts[3].trim_end_matches(".bin");
|
||||
if cities
|
||||
|
Loading…
Reference in New Issue
Block a user