4.3. INTERLIS Datenaustausch

Dies ist ein Leitfaden für den Import/Export von Daten zwischen QGEP und INTERLIS 2 Transfer Format (xtf).

4.3.1. Allgemeines

The QGEP plugin includes an experimental interlis import/export feature. It is currently capable of importing and exporting to the VSA-KEK ‚VSA_KEK_2019_LV95‘, which is an extension to the SIA405 wastewater model SIA405_ABWASSER_2015_LV95 (for more details see config).

Note that currently, exports are possible in German only. Translated exports are on the roadmap, let us know if you are interested in this feature.

4.3.2. Voraussetzungen

4.3.2.1. Java

Sie benötigen Java auf ihrem System.

Windows : Java for windows download MacOS : Java for MacOS download Linux : use the package manager

4.3.2.2. Python Bibliotheken

Sie benötigen sqlalchemy und geoalchemy2.

To install : before launching QGIS, open OSGeo4W Shell

../../_images/osgeo4wshell.jpg

and type:

>>> pip3 install "sqlalchemy~=1.3.22" "geoalchemy2>=0.9.0"

If the command fails, try:

>>> pip3 install --upgrade pip

Bemerkung

If pip cannot be found, make sure you’ve installed the python3-pip package using the OSGeo4W network installer (if you’ve installed the standalone version of QGIS, it should be included).

If this command still fails, try:

>>> pip3 install --target=c:\somewhere\other\than\the\default --upgrade pip

where c:\somewhere\other\than\the\default is the path to your current pip package

The same –target flag can be added to install sqlalchemy and geoalchemy2 in another location.

4.3.2.3. Modelbaker

The QGEP plugin will propose to install the Modelbaker plugin automatically. If that did not work, install the QGIS plugin Modelbaker manually from the QGIS plugin manager (version 6.4 or newer but older than 7.1).

4.3.2.4. QGEP Version

The export only supports up-to-date QGEP datamodel (1.5.6 at the time of writing). Ensure your datamodel is fully updated before trying to import/export.

4.3.3. Benutzung (GUI)

4.3.3.1. Aktivieren Sie den Admin-Modus

Stellen Sie im Dialog „Plugin>QGEP>Einstellungen“ unter dem Reiter „Entwickleroptionen“ sicher, dass der „Admin-Modus“ aktiviert ist. Starten Sie QGIS neu.

../../_images/settings_dialog.png

In der QGEP-Symbolleiste sollten nun die neuen Schaltflächen „Import“ und „Export“ erscheinen.

../../_images/toolbar.png

4.3.3.2. Export

Um Ihre QGEP-Daten zu exportieren, klicken Sie auf die Schaltfläche „Exportieren“. Der folgende Dialog wird angezeigt.

../../_images/export_dialog.png

If you have an active selection in the nodes and/or reaches layer, you can choose to restrict the export to that selection. This is especially useful in combination with the upstream/downstream selection tools.

The export tools is capable of exporting label positions for different scales. You can choose which scales you are interested in exporting by selected/deselecting them.

Bestätigen Sie das Dialogfeld und wählen Sie einen Speicherort für die .xtf-Datei.

Bemerkung

Note that windows file pathes with empty strings in the directory path or filename are not supported at the moment.

Bemerkung

Beachten Sie, dass der Befehl bei grossen/vollständigen Exporten sehr lange dauern kann.

Bemerkung

Note that QGIS standard behaviour for too long labels is to turn them horizontally (orientation = 0). You can adjust the properties of the vw_qgep_reach layer - Symbology - Placement - Label overrun from „no overrun“ to e.g. 7 mm (Millimeter)

../../_images/layer_vw_qgep_reach_label_overrun.png

Bemerkung

Note that remark fields are truncated to 80 characters on INTERLIS Export, as the INTERLIS definition is like this. If you have remark fields with more text then consider to move this data to documentation with the classes „file“ and „data_media“ so it can be exported to INTERLIS completely where you can add any document, photo or video to a class.

Die Exporte enthalten einen Validierungsschritt unter Verwendung von ilivalidator, der Sie darüber informiert, ob der Export einen Validierungsfehler enthält.

4.3.3.3. Import

To import xtf`files, click on the `import button and navigate to the .xtf file.

Bemerkung

Note that windows file pathes with empty strings in the directory path or filename are not supported at the moment.

The following dialog will appear.

../../_images/import_dialog.png

Im linken Teil dieses Dialogfelds werden alle Elemente aufgelistet, die aus der .xtf-Datei importiert werden sollen, so dass Sie überprüfen können, was importiert werden soll, und Elemente abwählen können, die Sie eventuell überspringen möchten. Ausserdem wird der Validierungsstatus jedes Objekts angezeigt, der angibt, ob vor dem Import weitere Massnahmen erforderlich (UNGÜLTIG) oder empfohlen (WARNUNG) sind.

Im rechten Teil dieses Dialogs wird ein Formular angezeigt, das sich auf den in der Liste ausgewählten Elementtyp bezieht und die Anpassung des Imports ermöglicht. So können z. B. „Untersuchungen“ an ihre Kanäle angehängt werden.

Wenn Sie mit den Importoptionen zufrieden sind, bestätigen Sie den Dialog, um die Änderungen in Ihrer Datenbank zu übernehmen.

4.3.4. Benutzung (Befehlszeile)

Für fortgeschrittene Benutzer kann das Import/Export-Tool auch als Kommandozeilen-Tool verwendet werden. Eine entsprechende Dokumentation finden Sie unter https://github.com/QGEP/qgepqwat2ili/.

4.3.5. Qualitätskontrolle

4.3.5.1. Qualitätskontrolle mit VSA Checker (Fachprüfung) (online)

https://vsa.ch/wp-content/uploads/2020/04/Daten-checker-d-f-it.jpg

For details see explanation on the VSA Homepage

Information about access and licensing you can get here