sauvegarde scripts v1
pour éviter de perdre des trucs
This commit is contained in:
parent
aa39bcea80
commit
f4119f8989
|
@ -23,7 +23,7 @@ echo ""
|
||||||
|
|
||||||
|
|
||||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||||
echo " Récupération des fichiers geojson depuis umap"
|
echo " Patch de la couche de routage sur des secteurs particuliers"
|
||||||
|
|
||||||
PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME < patch_osm_roads_pgr.sql
|
PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME < patch_osm_roads_pgr.sql
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ FROM pgr_dijkstra(
|
||||||
'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr',
|
'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr',
|
||||||
12872, 12145) as a
|
12872, 12145) as a
|
||||||
JOIN osm_roads_pgr b
|
JOIN osm_roads_pgr b
|
||||||
ON a.edge = b.id
|
ON a.edge = b.id ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,34 @@
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
PSQL=/usr/bin/psql
|
# argument 1 = millesime redadeg
|
||||||
DB_HOST=breizhpolenovo
|
millesime=$1
|
||||||
DB_NAME=redadeg
|
|
||||||
|
# linux
|
||||||
|
#PSQL=/usr/bin/psql
|
||||||
|
# mac via brew
|
||||||
|
PSQL=/usr/local/bin/psql
|
||||||
|
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_PORT=55432
|
||||||
|
DB_NAME=redadeg_$millesime
|
||||||
DB_USER=redadeg
|
DB_USER=redadeg
|
||||||
DB_PASSWD=redadeg
|
DB_PASSWD=redadeg
|
||||||
|
|
||||||
|
# server bed110
|
||||||
|
#rep_scripts='/data/projets/ar_redadeg/scripts/'
|
||||||
|
# mac
|
||||||
|
rep_scripts='/Volumes/ker/mael/projets/osm_bzh/github/ar_redadeg/scripts'
|
||||||
|
|
||||||
|
echo "rep_scripts = $rep_scripts"
|
||||||
|
# variables liées au millésimes
|
||||||
|
echo "millesime de travail = $1"
|
||||||
|
rep_data=../data/$millesime
|
||||||
|
echo "rep_data = $rep_data"
|
||||||
|
echo "base de données = $DB_NAME sur $DB_HOST:$DB_PORT"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
|
||||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
@ -16,7 +38,7 @@ echo " Création des données phase 3"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# création des PK auto par découpage des tronçons de la phase 2
|
# création des PK auto par découpage des tronçons de la phase 2
|
||||||
/Library/FME/2018.1/fme traitements_phase_3_decoupage.fmw
|
/Library/FME/2021.0/fme traitements_phase_3_decoupage.fmw
|
||||||
|
|
||||||
# en sortie on obtient :
|
# en sortie on obtient :
|
||||||
# phase_3_pk_auto = couche de points
|
# phase_3_pk_auto = couche de points
|
||||||
|
@ -34,14 +56,14 @@ echo ""
|
||||||
echo " exports geojson"
|
echo " exports geojson"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
rm data/phase_3_pk_auto.geojson
|
rm $rep_data/phase_3_pk_auto.geojson
|
||||||
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
|
ogr2ogr -f "GeoJSON" $rep_data/phase_3_pk_auto.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_pk_auto_4326
|
||||||
rm data/phase_3_pk_sens_verif.geojson
|
rm $rep_data/phase_3_pk_sens_verif.geojson
|
||||||
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
|
ogr2ogr -f "GeoJSON" $rep_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
|
||||||
rm data/phase_3_trace_troncons.geojson
|
rm $rep_data/phase_3_trace_troncons.geojson
|
||||||
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
|
ogr2ogr -f "GeoJSON" $rep_data/phase_3_trace_troncons.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_trace_troncons_4326
|
||||||
rm data/phase_3_trace_secteurs.geojson
|
rm $rep_data/phase_3_trace_secteurs.geojson
|
||||||
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
|
ogr2ogr -f "GeoJSON" $rep_data/phase_3_trace_secteurs.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_trace_secteurs_4326
|
||||||
|
|
||||||
echo " fait"
|
echo " fait"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -49,7 +71,7 @@ echo " upload"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# upload
|
# upload
|
||||||
rsync -av -z data/phase_3_*.geojson breizhpovh2:/data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/
|
rsync -av -z $rep_data/phase_3_*.geojson bed100.bedniverel.bzh:/data/projets/ar_redadeg/data/$millesime/
|
||||||
|
|
||||||
echo " fait"
|
echo " fait"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
7213
scripts/traitements_phase_3_decoupage v1 2018.fmw
Normal file
7213
scripts/traitements_phase_3_decoupage v1 2018.fmw
Normal file
File diff suppressed because it is too large
Load diff
7574
scripts/traitements_phase_3_decoupage v2 2018.fmw
Normal file
7574
scripts/traitements_phase_3_decoupage v2 2018.fmw
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue