ar_redadeg/scripts/traitements_phase_3.sh

57 lines
1.7 KiB
Bash
Raw Normal View History

2019-10-13 12:30:09 +00:00
#!/bin/bash
set -e
set -u
PSQL=/usr/bin/psql
DB_HOST=192.168.56.131
DB_NAME=redadeg
DB_USER=redadeg
#cd /data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/
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 "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " Exports"
echo ""
echo " exports geojson"
echo ""
2019-10-13 16:06:24 +00:00
#rm data/phase_3_pk_auto.geojson
2019-10-13 12:30:09 +00:00
ogr2ogr -f "GeoJSON" data/phase_3_pk_auto.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_3_pk_auto_4326
2019-10-13 16:06:24 +00:00
#rm data/phase_3_pk_sens_verif.geojson
2019-10-13 12:30:09 +00:00
ogr2ogr -f "GeoJSON" data/phase_3_pk_sens_verif.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_3_pk_sens_verif_4326
2019-10-13 16:06:24 +00:00
#rm data/phase_3_trace_troncons.geojson
ogr2ogr -f "GeoJSON" data/phase_3_trace_troncons.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_3_trace_troncons_4326
#rm data/phase_3_trace_secteurs.geojson
ogr2ogr -f "GeoJSON" data/phase_3_trace_secteurs.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_3_trace_secteurs_4326
2019-10-13 12:30:09 +00:00
echo " fait"
echo ""
echo ""
echo ""
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " F I N"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo ""