mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 06:55:40 +03:00
Prep to import actdev again, and fix build break in game/src/lib
This commit is contained in:
parent
dd9ddb6e45
commit
fd73166292
@ -93,7 +93,7 @@ pub fn main() {
|
||||
|
||||
if let Some(site) = args.optional("--actdev") {
|
||||
let city = site.replace("-", "_");
|
||||
let name = MapName::new(city, "center");
|
||||
let name = MapName::new(&city, "center");
|
||||
flags.sim_flags.load = name.path();
|
||||
flags.study_area = Some(site);
|
||||
mode = Some(sandbox::GameplayMode::Blog(name));
|
||||
|
@ -14,12 +14,13 @@ fi
|
||||
CITY=${SITE/-/_}
|
||||
|
||||
cp -Rv importer/config/leeds importer/config/$CITY
|
||||
perl -pi -e "s#\"separate_cycleways\": false#\"separate_cycleways\": true#" importer/config/$CITY/cfg.json
|
||||
rm -fv importer/config/$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/$CITY/$MAP.poly
|
||||
GEOFABRIK=`cargo run --bin pick_geofabrik importer/config/$CITY/$MAP.poly`
|
||||
mv boundary0.poly importer/config/$CITY/center.poly
|
||||
GEOFABRIK=`cargo run --bin pick_geofabrik importer/config/$CITY/center.poly`
|
||||
echo "Geofabrik URL is $GEOFABRIK"
|
||||
perl -pi -e "s#\"osm_url\": \".*\"#\"osm_url\": \"$GEOFABRIK\"#" importer/config/$CITY/cfg.json
|
||||
|
||||
|
@ -20,7 +20,9 @@ pub fn import_scenarios(map: &Map, config: &ImporterConfiguration) -> Result<()>
|
||||
"https://raw.githubusercontent.com/cyipt/actdev/main/data-small/great-kneighton/desire_lines_disag.geojson",
|
||||
);
|
||||
|
||||
let bytes = abstio::slurp_file(abstio::path("input/great_kneighton/desire_lines_disag.geojson"))?;
|
||||
let bytes = abstio::slurp_file(abstio::path(
|
||||
"input/great_kneighton/desire_lines_disag.geojson",
|
||||
))?;
|
||||
let raw_string = std::str::from_utf8(&bytes)?;
|
||||
let geojson = raw_string.parse::<GeoJson>()?;
|
||||
let mut baseline = Vec::new();
|
||||
|
Loading…
Reference in New Issue
Block a user