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

INTERLIS Export with labels failing #101

Closed
sjib opened this issue Jan 22, 2024 · 5 comments · Fixed by #127
Closed

INTERLIS Export with labels failing #101

sjib opened this issue Jan 22, 2024 · 5 comments · Fixed by #127
Labels
bug Something isn't working INTERLIS About INTERLIS exchange format (import / export) plugin Concerns the wastewater plugin

Comments

@sjib
Copy link
Contributor

sjib commented Jan 22, 2024

Exporting the test-dataset-DSS gives the following error (With all 3 datamodels):
20240122_export_dss_labels_export

`Ein Fehler trat bei der Ausführung von Python-Code auf:

AttributeError: 'InterlisExporterToIntermediateSchema' object has no attribute '_export_label_positions'
Traceback (most recent call last):
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 474, in actionExportClicked
self.interlisImporterExporter.action_export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 142, in action_export
raise exception
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 113, in action_export
self.interlis_importer_exporter.interlis_export(
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 157, in interlis_export
self._export_to_intermediate_schema(
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 289, in _export_to_intermediate_schema
twwInterlisExporter.tww_export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 68, in tww_export
raise exception
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 63, in tww_export
self._export()
File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\interlis_model_mapping\interlis_exporter_to_intermediate_schema.py", line 92, in _export
self._export_label_positions()
AttributeError: 'InterlisExporterToIntermediateSchema' object has no attribute '_export_label_positions'

Python-Version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS-Version: 3.28.4-Firenze Firenze, fd0fb72ab3

Python-Pfad:
C:/PROGRA1/QGIS 3.28.4/apps/qgis-ltr/./python
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins
C:/PROGRA
1/QGIS 3.28.4/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.28.4\bin\python39.zip
C:\PROGRA1\QGIS 3.28.4\apps\Python39\DLLs
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib
C:\Program Files\QGIS 3.28.4\bin
C:\Users\Stefan\AppData\Roaming\Python\Python39\site-packages
C:\PROGRA1\QGIS 3.28.4\apps\Python39
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib\site-packages
C:\PROGRA1\QGIS 3.28.4\apps\Python39\lib\site-packages\win32
C:\PROGRA
1\QGIS 3.28.4\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS 3.28.4\apps\Python39\lib\site-packages\Pythonwin
C:/Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python
C:/Daten/QGEP/testing_dss2020
C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\tww_testing/python/plugins\teksi_wastewater\interlis\gui....`

@sjib sjib added bug Something isn't working plugin Concerns the wastewater plugin INTERLIS About INTERLIS exchange format (import / export) labels Jan 22, 2024
@sjib
Copy link
Contributor Author

sjib commented Jan 22, 2024

See also #82 (comment)

@cymed
Copy link
Contributor

cymed commented Jan 23, 2024

See also my review in #23, can be fixed by defining export_label_positions() here

@domi4484
Copy link
Contributor

domi4484 commented Feb 1, 2024

@sjib how should look the t_ili_tid for labels in the xtf? Should I use the function tww_sys.generate_oid?

@sjib
Copy link
Contributor Author

sjib commented Feb 1, 2024

@sjib how should look the t_ili_tid for labels in the xtf? Should I use the function tww_sys.generate_oid?

@cymed Any preferences for AG64/96 compatibility?

@domi4484 domi4484 mentioned this issue Feb 1, 2024
@cymed
Copy link
Contributor

cymed commented Feb 1, 2024

I prefer t_id = t_ili_tid = obj_id on export. generate_oid is the most straightforward solution.

If we use generate_oid, we need to reset the sequence after export, otherwise we cap 1M too quickly. Automated exports are usually on a weekly basis, with i.e. 25k labels would cap after 40 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working INTERLIS About INTERLIS exchange format (import / export) plugin Concerns the wastewater plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants