2019-10-13 12:30:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
|
|
|
|
PSQL=/usr/bin/psql
|
2020-02-15 10:19:28 +00:00
|
|
|
DB_HOST=breizhpolenovo
|
2019-10-13 12:30:09 +00:00
|
|
|
DB_NAME=redadeg
|
|
|
|
DB_USER=redadeg
|
2020-02-15 10:19:28 +00:00
|
|
|
DB_PASSWD=redadeg
|
2019-10-13 12:30:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo " Création des données phase 3"
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
# création des PK auto par découpage des tronçons de la phase 2
|
2019-10-13 16:06:24 +00:00
|
|
|
/Library/FME/2018.1/fme traitements_phase_3_decoupage.fmw
|
2019-10-13 12:30:09 +00:00
|
|
|
|
|
|
|
# en sortie on obtient :
|
|
|
|
# phase_3_pk_auto = couche de points
|
|
|
|
# phase_3_pk_sens_verif = couche de ligne direct PK à PK
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
# et on exporte en geojson pour umap
|
|
|
|
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
2020-02-15 10:10:23 +00:00
|
|
|
echo " Exports et upload vers le serveur de diffusion"
|
2019-10-13 12:30:09 +00:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo " exports geojson"
|
|
|
|
echo ""
|
|
|
|
|
2020-02-15 10:10:23 +00:00
|
|
|
rm data/phase_3_pk_auto.geojson
|
2020-02-15 10:19:28 +00:00
|
|
|
ogr2ogr -f "GeoJSON" data/phase_3_pk_auto.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_pk_auto_4326
|
2020-02-15 10:10:23 +00:00
|
|
|
rm data/phase_3_pk_sens_verif.geojson
|
2020-02-15 10:19:28 +00:00
|
|
|
ogr2ogr -f "GeoJSON" data/phase_3_pk_sens_verif.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_pk_sens_verif_4326
|
2020-02-15 10:10:23 +00:00
|
|
|
rm data/phase_3_trace_troncons.geojson
|
2020-02-15 10:19:28 +00:00
|
|
|
ogr2ogr -f "GeoJSON" data/phase_3_trace_troncons.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_trace_troncons_4326
|
2020-02-15 10:10:23 +00:00
|
|
|
rm data/phase_3_trace_secteurs.geojson
|
2020-02-15 10:19:28 +00:00
|
|
|
ogr2ogr -f "GeoJSON" data/phase_3_trace_secteurs.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_trace_secteurs_4326
|
2019-10-13 12:30:09 +00:00
|
|
|
|
|
|
|
echo " fait"
|
|
|
|
echo ""
|
2020-02-15 10:10:23 +00:00
|
|
|
echo " upload"
|
|
|
|
echo ""
|
2019-10-13 12:30:09 +00:00
|
|
|
|
2020-02-15 10:10:23 +00:00
|
|
|
# upload
|
2019-10-14 21:30:01 +00:00
|
|
|
rsync -av -z data/phase_3_*.geojson breizhpovh2:/data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/
|
|
|
|
|
2020-02-15 10:10:23 +00:00
|
|
|
echo " fait"
|
|
|
|
echo ""
|
2019-10-14 21:30:01 +00:00
|
|
|
|
2019-10-13 12:30:09 +00:00
|
|
|
echo ""
|
|
|
|
echo ""
|
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
2020-02-15 10:10:23 +00:00
|
|
|
echo " F I N traitements phase 3"
|
2019-10-13 12:30:09 +00:00
|
|
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
|
|
|
echo ""
|