phase 2 post traitements
This commit is contained in:
parent
5a7d474af1
commit
61e6251991
|
@ -60,7 +60,7 @@ INSERT INTO phase_2_trace_secteur
|
|||
ST_COLLECT(the_geom) AS the_geom
|
||||
FROM trace_ordered
|
||||
GROUP BY secteur_id
|
||||
ORDER BY secteur_id ;" >> /dev/null
|
||||
ORDER BY secteur_id ;"
|
||||
|
||||
# mise à jour des attributs
|
||||
PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c \
|
||||
|
@ -126,10 +126,10 @@ SET
|
|||
ELSE TRUNC( ST_Length(the_geom)::numeric , 0)
|
||||
END),
|
||||
km = uid -- km redadeg
|
||||
WHERE secteur_id = $secteur_id;"
|
||||
WHERE secteur_id = $secteur_id;" >> /dev/null
|
||||
|
||||
PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c \
|
||||
"VACUUM ANALYZE phase_2_trace_troncons ;"
|
||||
"VACUUM ANALYZE phase_2_trace_troncons ;" >> /dev/null
|
||||
|
||||
echo " fait"
|
||||
|
||||
|
|
|
@ -480,6 +480,20 @@ CREATE INDEX phase_2_trace_troncons_geom_idx ON phase_2_trace_troncons USING gis
|
|||
ALTER TABLE phase_2_trace_troncons OWNER to redadeg;
|
||||
|
||||
|
||||
-- une vue en 4326 pour export
|
||||
DROP VIEW IF EXISTS phase_2_trace_troncons_4326 ;
|
||||
CREATE VIEW phase_2_trace_troncons_4326 AS
|
||||
SELECT
|
||||
uid, secteur_id, ordre, km_reel, longueur,
|
||||
osm_id, highway, type, oneway, ref,
|
||||
name_fr, name_br,
|
||||
ST_Transform(the_geom,4326)::geometry(LineString, 4326) AS the_geom
|
||||
FROM phase_2_trace_troncons ;
|
||||
ALTER TABLE phase_2_trace_troncons_4326 OWNER to redadeg;
|
||||
|
||||
|
||||
|
||||
|
||||
DROP VIEW IF EXISTS phase_2_tdb ;
|
||||
CREATE VIEW phase_2_tdb AS
|
||||
WITH total AS
|
||||
|
|
Loading…
Reference in a new issue