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 " 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
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ FROM pgr_dijkstra(
|
|||
'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr',
|
||||
12872, 12145) as a
|
||||
JOIN osm_roads_pgr b
|
||||
ON a.edge = b.id
|
||||
ON a.edge = b.id ;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,12 +3,34 @@
|
|||
set -e
|
||||
set -u
|
||||
|
||||
PSQL=/usr/bin/psql
|
||||
DB_HOST=breizhpolenovo
|
||||
DB_NAME=redadeg
|
||||
# argument 1 = millesime redadeg
|
||||
millesime=$1
|
||||
|
||||
# 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_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 "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
|
@ -16,7 +38,7 @@ echo " Création des données phase 3"
|
|||
echo ""
|
||||
|
||||
# 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 :
|
||||
# phase_3_pk_auto = couche de points
|
||||
|
@ -34,14 +56,14 @@ echo ""
|
|||
echo " exports geojson"
|
||||
echo ""
|
||||
|
||||
rm 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
|
||||
rm 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
|
||||
rm 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
|
||||
rm 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
|
||||
rm $rep_data/phase_3_pk_auto.geojson
|
||||
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 $rep_data/phase_3_pk_sens_verif.geojson
|
||||
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 $rep_data/phase_3_trace_troncons.geojson
|
||||
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 $rep_data/phase_3_trace_secteurs.geojson
|
||||
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 ""
|
||||
|
@ -49,7 +71,7 @@ echo " upload"
|
|||
echo ""
|
||||
|
||||
# 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 ""
|
||||
|
|
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