export des PK pour merour
This commit is contained in:
parent
c05d9ba256
commit
3f1be575df
32
scripts_v2/phase_3_export.sh
Executable file
32
scripts_v2/phase_3_export.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
#! /bin/bash
|
||||
|
||||
# exit dès que qqch se passe mal
|
||||
set -e
|
||||
# sortir si "unbound variable"
|
||||
#set -u
|
||||
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Pas de millésime en argument --> stop"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# lecture du fichier de configuration
|
||||
. config.sh
|
||||
|
||||
|
||||
|
||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
echo " Export des données phase 3 pour le millésime $millesime"
|
||||
echo ""
|
||||
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
echo ""
|
||||
echo " Exports GeoJSON pour umap"
|
||||
|
||||
rm -f $rep_data/phase_2_trace_secteur.geojson
|
||||
ogr2ogr -f "GeoJSON" $rep_data/phase_3_pk.geojson PG:"host=$DB_HOST port=$DB_PORT user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_pk_4326
|
||||
|
||||
echo " fait"
|
||||
|
|
@ -683,7 +683,8 @@ CREATE VIEW phase_3_pk_4326 AS
|
|||
way_osm_id, way_highway, way_type, way_oneway, way_ref,
|
||||
way_name_fr, way_name_br,
|
||||
ST_Transform(the_geom,4326)::geometry(Point, 4326) AS the_geom
|
||||
FROM phase_3_pk ;
|
||||
FROM phase_3_pk
|
||||
ORDER BY pk_id;
|
||||
ALTER TABLE phase_3_pk_4326 OWNER TO redadeg;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue