Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for fk_checks on export #228

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
121 changes: 113 additions & 8 deletions en/admin-guide/interlis-io/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The QGEP plugin will propose to install the Modelbaker plugin automatically. If

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


Usage (GUI)
Expand All @@ -79,10 +79,10 @@ You should now see new `import` and `export` buttons in the QGEP toolbar.

.. figure:: images/toolbar.png

Export
Export to INTERLIS
-------------------------------------------------

To export your QGEP data, click on the `export` button. The following dialog will appear.
To export your QGEP data, click on the `Export to INTERLIS` button. The following dialog will appear.

.. figure:: images/export_dialog_new.png

Expand All @@ -102,20 +102,24 @@ You can also change the angle for horizontal text in INTERLIS if your target sys

Then, confirm the dialog and choose where to save the `.xtf` file.

.. note:: The export model name will be added to your filename that you choose. export.xtf will become export_DSS_2015_LV95.xtf
.. note::
The export model name will be added to your filename that you choose. export.xtf will become export_DSS_2015_LV95.xtf

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

.. note:: Note that for large/full exports, the command can take a long time.
.. note::
Note that for large/full exports, the command can take a long time.

.. note:: 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)

.. figure:: images/layer_vw_qgep_reach_label_overrun.png


.. note:: 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.
.. note::
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.

INTERLIS export starts with two integrity checks:
INTERLIS export starts with three integrity checks:

1. Integrity check Organisation subclasses
For VSA-DSS 2015 Export each organisation needs to be related to one of the seven subclasses of organisation (administrative_office, canton, cooperative, municipality, privat, wastewater_association, wastewater_treatment_plant).
Expand All @@ -134,6 +138,107 @@ All export models define the identifier attribute as MANDATORY. Therefore the ex

You will get a list of missing identifiers per class. Please add an identifier. If you do not have a separte identifier scheme for that class just copy the obj_id.

3. Check of missing references to organisation
Release 2015 has MANDATORY constraints for

- wastewater_structure.fk_owner
- wastewater_structure.fk_operator

.. figure:: images/export_check_fk_owner_null.png

So you have to pass this check to be able to export your data. The detailed log in the 'qgep' tab gives you more information ::

2024-10-04T15:34:46 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:INTEGRITY CHECK missing MAMDATORY owner references fk_owner...
2024-10-04T15:34:46 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wastewater_structure' without fk_owner : 1
2024-10-04T15:34:46 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_owner_count : 1
2024-10-04T15:34:46 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:ERROR: Missing mandatory fk_owner in qgep_od: 1

.. figure:: images/export_check_fk_owner_null_details.png


The following references will be needed with release 2020 of VSA-DSS and SIA405 Abwasser. But you only will get hints, that they are missing. But we strongly encourage you to fill in that data, as you will else face problems when doing the INTERLIS - INTERLIS transformation from Release 2015 to 2020.xx with CHECKVSA.

- fk_dataowner
- fk_provider

.. figure:: images/export_check_fk_provider_null.png

Detailed log ::

2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:INTEGRITY CHECK missing dataowner references fk_dataowner...
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'file' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'data_media' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'maintenance_event' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'organisation' without fk_dataowner : 2
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 2
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wastewater_structure' without fk_dataowner : 1
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wastewater_networkelement' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'structure_part' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'reach_point' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'pipe_profile' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'catchment_area' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'connection_object' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'control_center' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'hazard_source' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'hydr_geometry' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'hydraulic_char_data' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measurement_result' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measurement_series' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measuring_device' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'measuring_point' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'mechanical_pretreatment' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'overflow' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'overflow_char' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'retention_body' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'river_bank' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'river_bed' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'sector_water_body' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'substance' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'surface_runoff_parameters' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'surface_water_bodies' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'throttle_shut_off_unit' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'waste_water_treatment' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'water_catchment' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'water_control_structure' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'water_course_segment' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'wwtp_energy_use' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Number of datasets in class 'zone' without fk_dataowner : 0
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:missing_fk_dataowner_count : 3
2024-10-04T15:52:49 qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:ERROR: Missing mandatory fk_dataowner in qgep_od: 3

Exports include a validation step using `ilivalidator`, which will inform you whether the export contains INTERLIS validation error.

Expand Down
Loading