43 lines
608 B
Bash
43 lines
608 B
Bash
source scripts/index.sh
|
|
|
|
function GTFS
|
|
{
|
|
wget "$DOWNLOAD" -O tmp/GTFS.zip
|
|
cd tmp/
|
|
unzip -o GTFS.zip
|
|
cd ..
|
|
}
|
|
|
|
function plain
|
|
{
|
|
wget "$DOWNLOAD" -O tmp/stops.txt
|
|
}
|
|
|
|
function loop
|
|
{
|
|
for ((C=1;C <= $MAX;C++))
|
|
do
|
|
source scripts/index.sh
|
|
process
|
|
done
|
|
}
|
|
|
|
function process
|
|
{
|
|
if [ $TYPE = "plain" ]
|
|
then
|
|
plain
|
|
fi
|
|
if [ $TYPE = "GTFS" ]
|
|
then
|
|
GTFS
|
|
fi
|
|
|
|
cp tmp/stops.txt tmp/city_$CITY.csv
|
|
python3 scripts/process.py > tmp/city_$CITY.clean.csv
|
|
cp tmp/city_$CITY.clean.csv tmp/clean.csv
|
|
./build/mapgen -c tmp/clean.csv -t tmp/osm_$CITY.csv -p 1 -s 1500 > maps/map_$CITY.svg
|
|
}
|
|
|
|
loop
|