-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,10 @@ | ||
#!/usr/bin/env sh | ||
|
||
|
||
## S'il n'y a rien, on fait une génération à partir de données OSM sur la Corse en utilisant un fichier de configuration déjà présent dans l'image docker | ||
if [ ! $R2GG_ARG ] | ||
then | ||
|
||
mkdir -v /home/docker/data/data-osm-latest | ||
cd /home/docker/data/data-osm-latest | ||
wget -O data-osm-latest.osm.pbf download.geofabrik.de/europe/france/corse-latest.osm.pbf | ||
osrm-extract data-osm-latest.osm.pbf -p /usr/share/osrm/profiles/car.lua | ||
osrm-contract data-osm-latest.osrm | ||
mkdir -p /home/docker/data/resources/ | ||
mkdir -p /home/docker/data/sources/ | ||
cp -v /home/docker/config/data-osm.resource /home/docker/data/resources/ | ||
cp -v /home/docker/config/data-osm.source /home/docker/data/sources/ | ||
|
||
## S'il y a une configuration, alors on donne cette configuration à r2gg qui se chargera de l'analyser et d'agir en conséquence | ||
else | ||
|
||
# On lance une génération à partir du fichier de configuration | ||
r2gg-sql2pivot $R2GG_ARG | ||
|
||
if [ $GENERATION_TYPE = "osrm" ] | ||
then | ||
r2gg-pivot2osm $R2GG_ARG | ||
r2gg-osm2osrm $R2GG_ARG | ||
elif [ $GENERATION_TYPE = "pgr" ] || [ $GENERATION_TYPE = "smartpgr" ] | ||
then | ||
r2gg-pivot2pgrouting $R2GG_ARG | ||
elif [ $GENERATION_TYPE = "valhalla" ] | ||
then | ||
r2gg-pivot2osm $R2GG_ARG | ||
r2gg-osm2valhalla $R2GG_ARG | ||
fi | ||
|
||
r2gg-road2config $R2GG_ARG | ||
|
||
fi | ||
|
||
|
||
echo "debut" | ||
date +%Y-%m-%dT%H:%M:%S | ||
r2gg-pivot2osm /home/docker/config/bdtopo2osrm.json | ||
echo "fin pivot2osm" | ||
date +%Y-%m-%dT%H:%M:%S | ||
r2gg-osm2osrm /home/docker/config/bdtopo2osrm.json | ||
echo "fin" | ||
date +%Y-%m-%dT%H:%M:%S |