Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
QWAT and QGEP up and running

Arnaud Poncet-Montanges ponceta

😎
QWAT and QGEP up and running
View GitHub Profile
@ponceta
ponceta / fail.sql
Created Jul 4, 2022
QWAT 1.3.6 Fail
View fail.sql
C:\Program Files\pgAdmin 4\v6\runtime\pg_restore.exe --host "monserveur.pully.ch" --port "5432" --username "postgres" --no-password --role "postgres" --dbname "qwat_1.3.6_demo" --jobs "1" --verbose "pathtomybackupfile\\qwat_v1.3.6_data_and_structure_sample.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA "qwat_dr"
pg_restore: creating SCHEMA "qwat_od"
pg_restore: creating SCHEMA "qwat_sigip"
pg_restore: creating SCHEMA "qwat_sys"
pg_restore: creating SCHEMA "qwat_vl"
pg_restore: creating EXTENSION "hstore"
pg_restore: creating COMMENT "EXTENSION hstore"
pg_restore: creating EXTENSION "postgis"
@ponceta
ponceta / fail.sql
Last active Jul 4, 2022
QGEP 1.5.5 Restore fails
View fail.sql
C:\Program Files\pgAdmin 4\v6\runtime\pg_restore.exe --host "monserveur.pully.ch" --port "5432" --username "postgres" --no-password --role "postgres" --dbname "qgep_1.5.5_demo" --jobs "1" --verbose "pathtomybackup\\qgep_1.5.5_structure_and_demo_data.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA "qgep_import"
pg_restore: creating SCHEMA "qgep_network"
pg_restore: creating SCHEMA "qgep_od"
pg_restore: creating SCHEMA "qgep_swmm"
pg_restore: creating SCHEMA "qgep_sys"
pg_restore: creating SCHEMA "qgep_vl"
pg_restore: creating EXTENSION "hstore"
pg_restore: creating COMMENT "EXTENSION hstore"
@ponceta
ponceta / Readme.MD
Last active May 9, 2022
TEKSI Wastewater Readme File
@ponceta
ponceta / Permalink dev2
Last active Mar 2, 2021
Too long permalink
View Permalink dev2
@ponceta
ponceta / pully_custom.sql
Created May 23, 2019
QGEP : Pully's customization
View pully_custom.sql
--Ajout du matériau pour le radier
ALTER TABLE qgep_od.wastewater_node
ADD COLUMN pully_bottom_material integer;
CREATE TABLE qgep_vl.pully_node_bottom_material () INHERITS (qgep_sys.value_list_base);
ALTER TABLE qgep_vl.pully_node_bottom_material ADD CONSTRAINT pkey_qgep_vl_pully_node_bottom_material_code PRIMARY KEY (code);
INSERT INTO qgep_vl.pully_node_bottom_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (4540,4540,'other','andere','autre', 'altro', 'altul', '', '', '', '', '', 'true');
INSERT INTO qgep_vl.pully_node_bottom_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUES (4541,4541,'concrete','Beton','beton', 'zzz_Beton', 'beton', '', '', '', '', '', 'true');
INSERT INTO qgep_vl.pully_node_bottom_material (code, vsacode, value_en, value_de, value_fr, value_it, value_ro, abbr_en, abbr_de, abbr_fr, abbr_it, abbr_ro, active) VALUE
@ponceta
ponceta / vw_qgep_wastewater_structure2.sql
Last active Dec 13, 2018
Alternative view for wastewaterstructure
View vw_qgep_wastewater_structure2.sql
-- View: qgep_od.vw_qgep_wastewater_structure2
-- DROP VIEW qgep_od.vw_qgep_wastewater_structure2;
CREATE OR REPLACE VIEW qgep_od.vw_qgep_wastewater_structure2 AS
SELECT ws.identifier,
CASE
WHEN ma.obj_id IS NOT NULL THEN 'manhole'::text
WHEN ss.obj_id IS NOT NULL THEN 'special_structure'::text
WHEN dp.obj_id IS NOT NULL THEN 'discharge_point'::text
View qwat_od.valve.sql
-- Table: qwat_od.valve
-- DROP TABLE qwat_od.valve;
CREATE TABLE qwat_od.valve
(
id integer NOT NULL DEFAULT nextval('qwat_od.valve_id_seq'::regclass),
fk_valve_type integer NOT NULL,
fk_valve_function integer NOT NULL,
fk_valve_actuation integer NOT NULL,
@ponceta
ponceta / Create_QGEP_Drawing_Scheme.sql
Last active Feb 1, 2018
Create_QGEP_Drawing_Scheme
View Create_QGEP_Drawing_Scheme.sql
CREATE SCHEMA qgep_dr
AUTHORIZATION qgep;
COMMENT ON SCHEMA qgep_dr
IS 'QGEP drawing tools';
/* CREATE TABLE */
CREATE TABLE qgep_dr.constructionpoint (id serial PRIMARY KEY);
COMMENT ON TABLE qgep_dr.constructionpoint IS 'construction points are artificials points to build objects.';
@ponceta
ponceta / migration_TB2_QGEP.sql
Last active Apr 28, 2017
Notes de migration
View migration_TB2_QGEP.sql
SELECT DISTINCT ID_EINSTIEGHILFE
FROM AW_SCHACHT
SQL> select * from AW_SCHACHT_STEIGEISENG_TBD
ID EXTERNAL_ID VALUE DATE_OF_CREATION DESIGNER ACTIVE SHORT_VALUE COMMENTARY
---- ----------- ------------------- ---------------- -------- ------ ----------- ----------
10 autre 1
1 échelle 10.04.2000 SIA 1 EC
2 niches marchepied 10.04.2000 SIA 1 N
View PULLY_Pipe_materials.sql
INSERT INTO qwat_vl.pipe_material (id, vl_active, short_fr, value_fr, _displayname_fr, short_en, value_en, _displayname_en, short_ro, value_ro, _displayname_ro, diameter, diameter_nominal, diameter_internal, diameter_external, code_sire, pressure_nominal, sdr, wall_thickness) VALUES (10000, true, 'AC', 'Acier', 'AC i', '', '', ' ', 'OL', 'Otel', 'OL ', '', NULL, NULL, NULL, 99, NULL, NULL, NULL);
INSERT INTO qwat_vl.pipe_material (id, vl_active, short_fr, value_fr, _displayname_fr, short_en, value_en, _displayname_en, short_ro, value_ro, _displayname_ro, diameter, diameter_nominal, diameter_internal, diameter_external, code_sire, pressure_nominal, sdr, wall_thickness) VALUES (10001, true, 'AC', 'Acier', 'AC 3/4 "', '', '', 'AC 3/4 "', 'OL', 'Otel', 'OL ', '3/4 "', 24, 22, 27, 99, NULL, NULL, NULL);
INSERT INTO qwat_vl.pipe_material (id, vl_active, short_fr, value_fr, _displayname_fr, short_en, value_en, _displayname_en, short_ro, value_ro, _displayname_ro, diameter, diameter_nominal, diameter_internal, diamet