-
Notifications
You must be signed in to change notification settings - Fork 6
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
2024-04-interlis-export-orientation-option #217
Conversation
for more information, see https://pre-commit.ci
Should solve #216 |
for more information, see https://pre-commit.ci
…github.com/teksi/wastewater into 2024-04-interlis-export-orientation-option
for more information, see https://pre-commit.ci
plugin/teksi_wastewater/interlis/gui/interlis_export_settings_dialog.py
Outdated
Show resolved
Hide resolved
plugin/teksi_wastewater/interlis/gui/interlis_export_settings_dialog.py
Outdated
Show resolved
Hide resolved
plugin/teksi_wastewater/interlis/gui/interlis_importer_exporter_gui.py
Outdated
Show resolved
Hide resolved
…dialog.py self.export_orientation_selection_comboBox values as numbers Co-authored-by: Damiano Lombardi <[email protected]>
…dialog.py eorientation - currentData Co-authored-by: Damiano Lombardi <[email protected]>
for more information, see https://pre-commit.ci
…github.com/teksi/wastewater into 2024-04-interlis-export-orientation-option
""" | ||
Returns an angle between 0 and 359.9 (for Orientierung in Base_d-20181005.ili) | ||
""" | ||
if val is None: | ||
return None | ||
|
||
# add selected_orientation | ||
val = val + selected_orientation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No you have to pass the angle to the modulo function and to the exporter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the comments # neu export orientation
can be removed as they don't make the code more readable and are its clear by git that this option was added in a second time
plugin/teksi_wastewater/interlis/gui/interlis_export_settings_dialog.py
Outdated
Show resolved
Hide resolved
plugin/teksi_wastewater/interlis/gui/interlis_export_settings_dialog.py
Outdated
Show resolved
Hide resolved
plugin/teksi_wastewater/interlis/gui/interlis_export_settings_dialog.py
Outdated
Show resolved
Hide resolved
plugin/teksi_wastewater/interlis/gui/interlis_export_settings_dialog.ui
Outdated
Show resolved
Hide resolved
…dialog.py rename selected_orientation to labels_orientation_offset Co-authored-by: Damiano Lombardi <[email protected]>
export_orientation initialized as float Co-authored-by: Damiano Lombardi <[email protected]>
Add export_orientation=export_orientation to _export_to_intermediate_schema function
…tioned. see https://www.interlis.ch/ - INTERLIS is the official term
@@ -341,6 +350,7 @@ def _export_to_intermediate_schema( | |||
export_model, | |||
file_name=None, | |||
selected_ids=None, | |||
export_orientation=90.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you also need to pass this parameter to InterlisExporterToIntermediateSchema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export_orientation=selected_orientation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems not to work like that:
==================================== ERRORS ==================================== ___________ ERROR collecting teksi_wastewater/tests/test_interlis.py ___________ teksi_wastewater/tests/test_interlis.py:8: in <module> from teksi_wastewater.interlis.interlis_importer_exporter import ( teksi_wastewater/interlis/interlis_importer_exporter.py:56: in <module> class InterlisImporterExporter: teksi_wastewater/interlis/interlis_importer_exporter.py:156: in InterlisImporterExporter export_orientation=selected_orientation, E NameError: name 'selected_orientation' is not defined =========================== short test summary info ============================ ERROR teksi_wastewater/tests/test_interlis.py - NameError: name 'selected_ori... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 0.73s =============================== 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@domi4484 Is this now set as it should with: export_orientation=90.0,
Up to now, the labels_orientation_offset is not passed to the function _modulo_angle in the intermediate schema. This PR takes the changes from teksi#217 and applies the following fixes: - tww:extractlabels_interlis has no Parameter "EXPORT_ORIENTATION". Parameter is dropped on export of labels. file. - On Export, the orientation offset is passed to the intermediate schema
No description provided.