mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-26 16:02:23 +03:00
39f5d50fcd
City names are now disambiguated by a two-letter country code. This commit handles almost everything needed to make this transition. Main next steps are fixing up map edits automatically and making the city picker UI understand the extra level of hierarchy. A little bit of fallout: lakeslice gridlocks again; this regression is actually from the recent traffic signal changes, but I'm just now regenerating everything. Will fix soon.
34 lines
1.5 KiB
Bash
Executable File
34 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# This script imports a site from
|
|
# https://github.com/cyipt/actdev/tree/main/data-small as a new city and map.
|
|
# It follows https://a-b-street.github.io/docs/howto/new_city.html.
|
|
|
|
set -e
|
|
|
|
# This should be a directory name from https://github.com/cyipt/actdev/tree/main/data-small
|
|
SITE=$1
|
|
if [ "$SITE" == "" ]; then
|
|
echo Missing args;
|
|
exit 1;
|
|
fi
|
|
CITY=`echo $SITE | sed -r 's/-/_/g'`
|
|
|
|
cp -Rv importer/config/gb/leeds importer/config/gb/$CITY
|
|
perl -pi -e "s#\"separate_cycleways\": false#\"separate_cycleways\": true#" importer/config/gb/$CITY/cfg.json
|
|
rm -fv importer/config/gb/$CITY/*.poly
|
|
wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/small-study-area.geojson
|
|
cargo run --bin geojson_to_osmosis < small-study-area.geojson
|
|
rm -fv small-study-area.geojson
|
|
mv boundary0.poly importer/config/gb/$CITY/center.poly
|
|
GEOFABRIK=`cargo run --bin pick_geofabrik importer/config/gb/$CITY/center.poly`
|
|
echo "Geofabrik URL is $GEOFABRIK"
|
|
perl -pi -e "s#\"osm_url\": \".*\"#\"osm_url\": \"$GEOFABRIK\"#" importer/config/gb/$CITY/cfg.json
|
|
|
|
wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/site.geojson -O data/system/study_areas/$SITE.geojson
|
|
|
|
./import.sh --raw --map --city=gb/$CITY
|
|
|
|
echo "You have to manually update .gitignore, map_gui/src/tools/mod.rs, release/deploy_actdev.sh"
|
|
echo "You might need to procedurally generate houses."
|
|
echo "And after uploading, probably want to: cargo run --bin updater -- --opt-into-all > data/player/data.json"
|