{"id":18720264,"url":"https://github.com/qwat/qwat","last_synced_at":"2026-03-07T03:02:03.574Z","repository":{"id":37735311,"uuid":"2986705","full_name":"qwat/QWAT","owner":"qwat","description":"TEKSI Water module (project QWAT) - QGIS project","archived":false,"fork":false,"pushed_at":"2024-12-09T15:44:23.000Z","size":45159,"stargazers_count":59,"open_issues_count":70,"forks_count":31,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-26T05:09:24.288Z","etag":null,"topics":["drinkable","gis","network","postgis","postgresql","python","qgis","water"],"latest_commit_sha":null,"homepage":"https://www.teksi.ch","language":"QML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qwat.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-12-15T10:03:18.000Z","updated_at":"2025-01-17T08:50:53.000Z","dependencies_parsed_at":"2024-12-16T18:27:57.893Z","dependency_job_id":"549ace4a-df8c-48ff-95ab-6728d627c03a","html_url":"https://github.com/qwat/QWAT","commit_stats":{"total_commits":1335,"total_committers":16,"mean_commits":83.4375,"dds":0.2119850187265918,"last_synced_commit":"976f1043941847ce3e58f01b43171c1eed00c565"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/qwat/QWAT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwat%2FQWAT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwat%2FQWAT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwat%2FQWAT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwat%2FQWAT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qwat","download_url":"https://codeload.github.com/qwat/QWAT/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwat%2FQWAT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drinkable","gis","network","postgis","postgresql","python","qgis","water"],"created_at":"2024-11-07T13:30:03.209Z","updated_at":"2026-03-07T03:02:03.532Z","avatar_url":"https://github.com/qwat.png","language":"QML","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: qwat.png\n\n\nQWAT: QGIS Water Module\n=======================\n\nDocumentation\n-------------\n\nHosted version here: https://qwat.github.io/docs/\n\nThe documentation has its own repository at https://github.com/qwat/docs\n\nRequirements\n------------\n\nServer side software components are:\n\n* `PostgreSQL \u003chttps://postgresql.org/\u003e`_ (\u003e 9.6)\n* `PostGIS \u003chttps://postgis.net/\u003e`_, the spatial extension (\u003e 2.3)\n* `Python \u003chttps://www.python.org/\u003e`_, for installation and update (\u003e 3.5)\n* `PUM \u003chttps://github.com/opengisch/pum\u003e`_ for upgrade\n\nSupported and tested versions are PostgreSQL 9.6 and Postgis 2.3.\n\nThe exact required hardware configuration is very dependant on the data sizes.\nHowever, water network data tend not to be huge volumes, and the minimal required configuration is very low.\n\nA comfortable configuration would be the following:\n\n* 4x Core Intel\n* \u003e= 8GB RAM\n* SSD Storage (40GB+) with Raid capabilities for data redundancy\n\nWe recommend using Linux as Operating System when running PostgreSQL, for performance and stability.\n\n\nInstall\n-------\n\nAssuming you have installed a postgresql server, there are two ways to set up the QWAT database:\n- The first way is to create an empty database with ``init_qwat.sh``.\n- The second way is to create a database from the sample dump using ``pg_restore``.\n\nFirst way. Create an empty database with ``init_qwat.sh``\n`````````````````````````````````````````````````````````\n\nGet the repositories. In a shell:\n\n::\n\n    git clone https://github.com/qwat/qwat\n    cd qwat\n\nUpdate data-model submodule:\n\n::\n\n    git submodule update --init --recursive\n\nIn order to create the database model you need to create a postgresql database.\nDo to this you may execute for example:\n\n::\n\n    psql -U postgres -c 'create database qwat'\n\nYou can choose whatever name for the database and whatever user as its owner.\nThe script that is used to create the database model looks for the\n`.pg_service.conf \u003chttp://www.postgresql.org/docs/current/static/libpq-pgservice.html\u003e`_ file in the\nusers home directory or in the directory specified by the\n`PGSYSCONFDIR or PGSERVICEFILE \u003chttp://www.postgresql.org/docs/current/static/libpq-envars.html\u003e`_ variables.\n\nAssuming you named your database ``qwat``, edit the ``.pg_service.conf`` file and make it look like:\n\n::\n\n    [qwat]\n    #enter your database ip\n    host=127.0.0.1\n    #database name\n    dbname=qwat\n    port=5432\n    user=postgres\n    #you can also add your password if you like\n    password=YourPassword\n\nNow go to the ``data-model`` directory and run the ``./init_qwat.sh`` script:\n\n::\n\n    cd data-model\n    ./init_qwat.sh -p qwat -s 21781 -d -r\n\nThe script has the following options:\n\n- ``-p``                     PG service to connect to the database.\n- ``-s`` or ``--srid``         PostGIS SRID. Default to 21781 (ch1903)\n- ``-d`` or ``--drop-schema``    drop schemas (cascaded) if they exist\n- ``-r`` or ``--create-roles`` create roles in the database\n\nOptionally, you can restore a sample dataset. For that you need to download the data sample dump and restore it into the QWAT database:\n\n::\n\n    QWAT_VERSION=`cat system/CURRENT_VERSION.txt`\n    wget -q -O qwat_dump.backup \"https://github.com/qwat/qwat-data-model/releases/download/$QWAT_VERSION/qwat_v\"$QWAT_VERSION\"_data_only_sample.backup\"\n    pg_restore -U postgres --dbname qwat -e --no-owner --verbose --jobs=3 --disable-triggers --port 5432 qwat_dump.backup\n\nSecond way. Create a database from the sample dump using ``pg_restore``\n```````````````````````````````````````````````````````````````````````\nQWAT can be tested by downloading the QGS project repository `here \u003chttps://github.com/qwat/QWAT\u003e`_ and restoring the latest `data_and_structure_sample.backup \u003chttps://github.com/qwat/qwat-data-model/releases/latest\u003e`_ in PostgreSQL.\n\nIn your shell:\n\n::\n\n    # Create the database and the extensions\n    psql -U postgres -c 'create database qwat;'\n    psql -U postgres -d qwat -c 'create extension postgis;'\n    psql -U postgres -d qwat -c 'create extension hstore;'\n\n    # Create the roles for QWAT\n    psql -c 'CREATE ROLE qwat_viewer NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;' -U postgres\n    psql -c 'CREATE ROLE qwat_user NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;' -U postgres\n    psql -c 'CREATE ROLE qwat_manager NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;' -U postgres\n    psql -c 'CREATE ROLE qwat_sysadmin NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;' -U postgres\n\n    # And restore it into your QWAT database\n    pg_restore -U postgres --dbname qwat -e --no-owner --verbose --jobs=3 --disable-triggers --port 5432 qwat_dump.backup\n    \n\nOpen the project\n----------------\n\nAfter your model gets created, in QGIS you should be able now to connect to the\ndatabase by creating a new connection with ``Name=qwat``, ``Service=qwat``, ``SSL mode=prefer``.\n\nIf that works then open the ``qgis-projetct/qwat.qgs`` project in QGIS.\n\n\nCredits\n-------\n\nsee `CREDITS \u003chttps://github.com/qwat/QWAT/blob/master/CREDITS.rst\u003e`_\n\nLicense\n-------\n\nThis work is free software and licenced under the GNU GPL version 2 or any later version.\n\nYou can get the `LICENSE here \u003chttps://github.com/qwat/QWAT/blob/master/LICENSE\u003e`_ .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwat%2Fqwat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwat%2Fqwat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwat%2Fqwat/lists"}