Skip to content

Instantly share code, notes, and snippets.

View ponceta's full-sized avatar
😎
QWAT and QGEP up and running

Arnaud Poncet-Montanges ponceta

😎
QWAT and QGEP up and running
View GitHub Profile
@ponceta
ponceta / generate_report.py
Created April 3, 2023 12:17
Generate Report QGIS 3
#!/usr/bin/env python3
import argparse
from qgis.core import QgsProject, QgsLayoutExporter, QgsApplication
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='QGIS PDF generator')
parser.add_argument('project_path', type=str,
@ponceta
ponceta / erreur_restore_pgadmin_qgep_1.5.6-1.sql
Created October 10, 2022 08:40
Erreurs au restor du modèle de données DEMO 1.5.6-1
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"
pg_restore: creating EXTENSION "postgis"
@ponceta
ponceta / fail.sql
Created July 4, 2022 09:18
QWAT 1.3.6 Fail
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 July 4, 2022 09:31
QGEP 1.5.5 Restore fails
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 14:15
TEKSI Wastewater Readme File
@ponceta
ponceta / Permalink dev2
Last active March 2, 2021 12:51
Too long permalink
@ponceta
ponceta / pully_custom.sql
Created May 23, 2019 08:06
QGEP : Pully's customization
--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 December 13, 2018 13:54
Alternative view for wastewaterstructure
-- 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
@ponceta
ponceta / qwat_od.valve.sql
Created July 26, 2018 14:08
QWAT OD valve
-- 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 February 1, 2018 09:57
Create_QGEP_Drawing_Scheme
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.';