Update create_osm_roads_pgr.sh
gestion millésime + on s'arrête pas si la topologie n'existe pas
This commit is contained in:
parent
3aa7cb0d7a
commit
7f895246d1
|
@ -3,10 +3,14 @@
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
|
# argument 1 = millesime redadeg
|
||||||
|
millesime=$1
|
||||||
|
|
||||||
PSQL=/usr/bin/psql
|
PSQL=/usr/bin/psql
|
||||||
DB_HOST=localhost
|
DB_HOST=localhost
|
||||||
DB_NAME=redadeg
|
DB_NAME=redadeg_$millesime
|
||||||
DB_USER=redadeg
|
DB_USER=redadeg
|
||||||
|
DB_PASSWD=redadeg
|
||||||
|
|
||||||
|
|
||||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
@ -19,7 +23,7 @@ echo ""
|
||||||
|
|
||||||
echo ">> suppression de la topologie existante"
|
echo ">> suppression de la topologie existante"
|
||||||
echo ""
|
echo ""
|
||||||
$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT DropTopology('osm_roads_topo') ;"
|
$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT DropTopology('osm_roads_topo') ;" || true
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# création d'un schéma qui va accueillir le réseau topologique de la couche osm_roads
|
# création d'un schéma qui va accueillir le réseau topologique de la couche osm_roads
|
||||||
|
|
Loading…
Reference in a new issue