-
Notifications
You must be signed in to change notification settings - Fork 0
TEKSI INTERLIS Tool (TIT)
Import and export of INTERLIS files
TIT allows to import and export data with the INTERLIS format from the various TEKSI modules. It secures that data collected and maintained in all TEKSI modules can be imported and exported to the standard INTERLIS modeles of the respective technical association such as SIA, VSA, SVGW and Thermische Netze Schweiz.
TIT should work similar to the TEKSI Wastewater module INTERLIS Import / Export but take the existing framework and functionality and place it in a separate plugin so it can be use for all TEKSI modules.
https://teksi.github.io/wastewater/admin-guide/interlis-io/index.html#
TIT builds up on the use of ModelBaker that allows to create a postgres (intermediary) schema from a (German) INTERLIS model file (ili). ModelBaker is using of ili2pg tools from Eisenhut Informatik to generate an import or export schema with the wanted INTERLIS data model (e.g. VSA-DSS / SIA405 Abwasser, VSA-KEK, etc.)
Schema to schema transfer with a series of matching scripts TEKSI schema < > ili2pg postgres schema: This includes
- Translation Englisch – German (Classes / Attributes)
- Conversion of value list to / from numeric values (Integer)
- Restructuring of data from relational to object oriented modelling
- Validating data before import or after export with ilivalidator
Based on the conception from TWW INTERLIS Import / Export
the configuration and architecture should be extended so it can be used for all TEKSI modules and supported models
- The TIT plugin GUI is defined in
plugin/tit/interlis/gui
: It creates the buttons for INTERLIS Import and Export - The INTERLIS Import / Export GUI is defined in
plugin/tit/interlis/gui
: Export: It allows to select on export the model wanted and to choose if labels are exported and which is the rotation of the labels and to choose a path to save the xtf and select where logs are stored. Import: It allows to select the xtf file to import.
The matching scripts are structured as follows: https://github.com/teksi/tit/tree/main/plugin/tit/interlis
-
Configuration (
plugin/tit/interlis/config.py
) Contains all configuration likes base directiory, ilivalidator version, model and topic name and schema prefix names -
Import Export Process Definition (
plugin/tit/interlis/interlis_importer_exporter.py
) -
Model Matchings (
plugin/tit/interlis/interlis_model_mapping
):- For each model a mapping file is created: model_base.py, model_interlis_sia405_abwasser.py, model_interlis_dss.py, model_interlis_vsa_kek.py
- For each module a schema definition is created: e.g. twww: model_tww.py (schema) and model_tww_od.py (classes)
- For export a matching order is defined in
interlis_exporter_to_intermediate_schema.py
- For import a matching order is defined in
interlis_importer_to_intermediate_schema.py
to do specify specific steps for adaption of TWW INTERLIS Import / Export to TIT INTERLIS Import / Export
- Parameter and filter to select module to export from / import to
- This influences also the schema prefix of the classes
- Matching for the following new models: SIA405_Fernwirkkabel, SIA405_Schutzrohr, SIA405_Fernwaerme
- Matching for the following new models: SIA405_Fernwirkkabel, SIA405_Schutzrohr, SIA405_Fernwaerme