Skip to content

Commit

Permalink
Merge pull request #391 from teksi/2024-08-28-patch-documentation
Browse files Browse the repository at this point in the history
2024-08-28-patch-documentation
  • Loading branch information
ponceta authored Aug 30, 2024
2 parents 4084a86 + 985f797 commit f4b8528
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You most likely want to make changes to the files in the folder `en`. That's
where all the real documentation text is located. The documentation is written
in reStructuredText, a simple syntax to structure the text. You can find
information about it in the [reStructuredText
Primer](http://sphinx-doc.org/rest.html) or by looking at what is already in
Primer](https://sublime-and-sphinx-guide.readthedocs.io/en/latest/topics.html) or by looking at what is already in
the documentation and make your changes according to it.

Once you have made changes which you would like to contribute back to the main
Expand Down
59 changes: 40 additions & 19 deletions docs/en/admin-guide/interlis-io/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ If the command fails, try::

>>> pip3 install --upgrade pip

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

Expand Down Expand Up @@ -94,22 +95,27 @@ The export tools is capable of exporting label positions for different scales. Y

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

.. 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_tww_reach layer - Symbology - Placement - Label overrun from "no overrun" to e.g. 7 mm (Millimeter)
.. 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_tww_reach layer - Symbology - Placement - Label overrun from "no overrun" to e.g. 7 mm (Millimeter)

.. figure:: images/layer_vw_tww_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.

The following validations are run as pre-process:
* Validate subclasses before export: check_subclass_counts

.. note:: Currently you will only find an ERROR message in the tww procotol tab if this check fails:
`2024-07-26T10:29:03 teksi_wastewater.utils:ERROR: number of subclass elements of structure_part NOT CORRECT in schema tww_od: checksum = 1 (positive number means missing entries, negative means too many subclass entries)`
.. note::
Currently you will only find an ERROR message in the tww procotol tab if this check fails:
`2024-07-26T10:29:03 teksi_wastewater.utils:ERROR: number of subclass elements of structure_part NOT CORRECT in schema tww_od: checksum = 1 (positive number means missing entries, negative means too many subclass entries)`


Exports include a validation step at the end using `ilivalidator`, which will inform you whether the export contains INTERLIS validation errors.
Expand All @@ -119,15 +125,26 @@ If the export is not successfull you will get either error messages during the e

You can check the protocol window and the text logs for further details.

There are four different log files:

Export step | Description | Log File
-------- | -------- | --------
Export schema | Creation of export schema with ili2db and the selected INTERLIS model file | *.ili2pg-schemaimport.log
Data export intermediatary schema | Export of data from tww_od to the new intermediary schema, translation from English to German | *.tww2ili-export.log
Data export to xtf | Data export from intermediary schema to INTERLIS Transfer file (xtf) | *.ili2pg-export-MODELNAME.log
INTERLIS validation | Validation of the created xtf file(s) with ilivalidator | *.ilivalidator-MODELNAME.log
.. list-table:: There are four different log files:
:widths: 25 50 25
:header-rows: 1

* - Heading Export step
- Heading Description
- Heading Log File
* - Export schema
- Creation of export schema with ili2db and the selected INTERLIS model file
- ``*.ili2pg-schemaimport.log``
* - Data export intermediatary schema
- Export of data from tww_od to the new intermediary schema, translation from English to German
- *.tww2ili-export.log
* - Data export to xtf
- Data export from intermediary schema to INTERLIS Transfer file (xtf)
- ``*.ili2pg-export-MODELNAME.log``
* - INTERLIS validation
- Validation of the created xtf file(s) with ilivalidator
- ``*.ilivalidator-MODELNAME.log``


INTERLIS Import
Expand All @@ -137,11 +154,13 @@ INTERLIS Import

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

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

__Organisations before data !__
**Organisations before data !**

.. note:: Starting with release 2020 all organisations are in a separated dataset and need to be imported first, else a bunch of errors will be thrown on all references like fk_dataowner, fk_owner, fk_provider, etc. Download the VSA Organisation data set from https://www.vsa.ch/models/organisation/vsa_organisationen_2020_1.xtf and start with importing that data set. This data set is updated regularly - so please come back and check (and maybe re-import) at a later stage to have access to all available organisation.
.. note::
Starting with release 2020 all organisations are in a separated dataset and need to be imported first, else a bunch of errors will be thrown on all references like fk_dataowner, fk_owner, fk_provider, etc. Download the VSA Organisation data set from https://www.vsa.ch/models/organisation/vsa_organisationen_2020_1.xtf and start with importing that data set. This data set is updated regularly - so please come back and check (and maybe re-import) at a later stage to have access to all available organisation.

If you have organisations that are not yet in that data set `please inform the VSA and hand in an application to be added <https://vsa.ch/fachbereiche-cc/siedlungsentwaesserung/generelle-entwaesserungsplanung/datenmanagement/#Organisationstabelle>`_.

Expand All @@ -156,9 +175,11 @@ The left part of this dialog lists all elements that are going to be imported fr

The right part of this dialog shows a form specific to the type of element selected in the list, allowing to adapt the import.

.. note:: Currently de-selecting and selecting objects might take a long time depending how many data sets are in that respective class.
.. note::
Currently de-selecting and selecting objects might take a long time depending how many data sets are in that respective class.

.. note:: Special feature for TV Inspection import: For instance, it allows to attach "examinations" to their pipes.
.. note::
Special feature for TV Inspection import: For instance, it allows to attach "examinations" to their pipes.

Once you're happy with the import options, confirm the dialog to persist the changes to your database.

Expand Down

0 comments on commit f4b8528

Please sign in to comment.