├── QgisModelBaker ├── CHANGELOG.md ├── gui │ ├── __init__.py │ ├── panel │ │ ├── __init__.py │ │ ├── db_panel_utils.py │ │ ├── db_config_panel.py │ │ ├── log_panel.py │ │ └── export_models_panel.py │ ├── edit_command.py │ ├── topping_wizard │ │ └── generation_page.py │ ├── create_baskets.py │ ├── edit_dataset_name.py │ ├── workflow_wizard │ │ └── intro_page.py │ └── custom_model_dir.py ├── utils │ ├── __init__.py │ ├── mssql_utils.py │ └── globals.py ├── yamltools │ └── __init__.py ├── processing_provider │ ├── __init__.py │ └── provider.py ├── images │ ├── file_types │ │ ├── data.png │ │ ├── ili.png │ │ ├── xml.png │ │ ├── xtf.png │ │ └── model.png │ └── QgisModelBaker-icon.svg ├── ui │ ├── create_baskets.ui │ ├── gpkg_settings_panel.ui │ ├── basket_panel.ui │ ├── layer_tids_panel.ui │ ├── tid_manager.ui │ ├── workflow_wizard │ │ ├── session_panel.ui │ │ ├── tid_configuration.ui │ │ ├── intro.ui │ │ ├── execution.ui │ │ ├── export_data_configuration.ui │ │ └── database_selection.ui │ ├── tid_configurator_panel.ui │ ├── filter_data_panel.ui │ ├── topping_wizard │ │ ├── generation.ui │ │ ├── layers.ui │ │ ├── layer_style_categories.ui │ │ ├── additives.ui │ │ └── models.ui │ ├── basket_manager.ui │ ├── edit_dataset_name.ui │ ├── drop_message.ui │ ├── set_sequence_panel.ui │ ├── export_models_panel.ui │ ├── drop_quick_message.ui │ ├── edit_command.ui │ ├── edit_basket.ui │ ├── help_dialog.ui │ └── dataset_manager.ui ├── metadata.txt ├── __init__.py └── metaproject.py ├── docs ├── .tx │ └── config ├── theme_overrides │ ├── main.html │ ├── 404.html │ ├── home.html │ ├── home.de.html │ └── home.fr.html ├── requirements-dev.txt ├── requirements.txt ├── docs │ ├── index.md │ ├── index.de.md │ ├── index.fr.md │ ├── assets │ │ ├── menu.png │ │ ├── toolbar.png │ │ ├── quick-done.png │ │ ├── quick-fail.png │ │ ├── validation.png │ │ ├── arrow_button.png │ │ ├── plus_button.png │ │ ├── quick-dialog.png │ │ ├── quick-import.png │ │ ├── quick-wizard.png │ │ ├── settings_db.png │ │ ├── toppings_uml.png │ │ ├── catalogues_form.png │ │ ├── dataset_manager.png │ │ ├── oid_tid_manager.png │ │ ├── plugin_manager.png │ │ ├── settings_ili2db.png │ │ ├── toppings_style.png │ │ ├── upgrade_create.png │ │ ├── checkmark_button.png │ │ ├── dataset_selector.png │ │ ├── drag_arrows_button.png │ │ ├── generated_project.png │ │ ├── oid_physical_data.png │ │ ├── settings_general.png │ │ ├── settings_interlis.png │ │ ├── toppings_localrepo.png │ │ ├── toppings_save_qml.png │ │ ├── transifex-projects.png │ │ ├── validation_verbose.png │ │ ├── extended-models-hide.png │ │ ├── extended-models-none.png │ │ ├── file_browser_button.png │ │ ├── toppings_multimodels.png │ │ ├── toppings_qgis_legend.png │ │ ├── toppings_raw_import.png │ │ ├── toppings_toml_config.png │ │ ├── transifex-translate.png │ │ ├── upgrade_export_data.png │ │ ├── upgrade_import_data.png │ │ ├── baskets_dataset_manager.png │ │ ├── dataset_basket_manager.png │ │ ├── extended-models-group.png │ │ ├── toppings-exporter-layer.png │ │ ├── toppings-exporter-model.png │ │ ├── toppings-exporter-repo.png │ │ ├── toppings_ili2dboptions.png │ │ ├── toppings_legend_entry.png │ │ ├── toppings_uml_modelbaker.png │ │ ├── transifex-search-mask.png │ │ ├── transifex-translating.png │ │ ├── upgrade_import_schema.png │ │ ├── validation_configfile.png │ │ ├── validation_exportmodels.png │ │ ├── workflow_wizard_intro.png │ │ ├── catalogues_relationeditor.png │ │ ├── catalogues_treevalidation.png │ │ ├── toppings-exporter-ili2db.png │ │ ├── toppings-exporter-project.png │ │ ├── toppings-exporter-target.png │ │ ├── toppings_exporter_target.png │ │ ├── toppings_original_project.png │ │ ├── toppings_raw_import_toml.png │ │ ├── transifex-join-requested.png │ │ ├── catalogues_withoutvalidation.png │ │ ├── dataset_relation_reference.png │ │ ├── extended-models-baskets-all.png │ │ ├── toppings-abstract-metaconfig.png │ │ ├── toppings-exporter-generated.png │ │ ├── toppings-exporter-reference.png │ │ ├── workflow_wizard_data_import.png │ │ ├── workflow_wizard_export_data.png │ │ ├── validation_skipgeometryerrors.png │ │ ├── workflow_wizard_ili2db_options.png │ │ ├── workflow_wizard_schema_import.png │ │ ├── workflow_wizard_schema_session.png │ │ ├── dataset_relation_reference_domain.png │ │ ├── extended-models-baskets-relevant.png │ │ ├── toppings-abstract-modelselection.png │ │ ├── toppings-abstract-projecttopping.png │ │ ├── toppings-abstract-referenceddata.png │ │ ├── toppings-abstract-toppingdownload.png │ │ ├── toppings-exporter-layer-styleicon.png │ │ ├── workflow_wizard_db_configuration.png │ │ ├── workflow_wizard_export_data_base.png │ │ ├── workflow_wizard_source_selection.png │ │ ├── meta_attributes_relation_reference.png │ │ ├── toppings-exporter-additive-settings.png │ │ ├── workflow_wizard_project_generation.png │ │ ├── workflow_wizard_tid_generator_page.png │ │ ├── workflow_wizard_default_baskets_page.png │ │ ├── workflow_wizard_schema_import_tooltip.png │ │ ├── workflow_wizard_schema_import_linked_models.png │ │ └── modelbaker_icon.svg │ ├── background_info │ │ ├── faq.md │ │ ├── upgrade_3_to_4.md │ │ └── repositories.md │ ├── about │ │ ├── development.md │ │ └── translation.md │ └── user_guide │ │ ├── quick_visualizer.md │ │ ├── plugin_configuration.md │ │ ├── export_workflow.md │ │ └── get_started.md ├── demodata │ ├── TheCityAndTheCity_V1.ili │ ├── GL_Wildruhezonen_V1_2020-03-31.ili │ └── GL_Wildruhezonen_Zielarten.xml └── scripts │ └── transifex_utils.py ├── requirements.txt ├── branding ├── Branding_2022.pdf ├── fonts │ ├── AvenirNextLTPro-BoldCn.otf │ └── ClassicGrotesquePro-SmBd.otf ├── logo │ ├── PNG │ │ ├── Logo_Green_Modelbaker_RGB.png │ │ ├── Muffin_Green_Modelbaker_RGB.png │ │ ├── Logo_Green_Modelbaker_RGB_QGIS.png │ │ ├── Logo_Green_Modelbaker_RGB_white.png │ │ └── Logo_Green_Modelbaker_RGB_QGIS_white.png │ ├── long_logo │ │ ├── Long-Logo_Green_Modelbaker_RGB.png │ │ ├── Long-Logo_Green_Modelbaker_RGB_QGIS.png │ │ └── Long-Logo_Green_Modelbaker_RGB.svg │ └── SVG │ │ ├── Muffin_Green_Modelbaker_RGB.svg │ │ └── Logo_Green_Modelbaker_RGB.svg └── logo_inofficial │ ├── PNG │ ├── Logo_Red_Modelbaker_RGB.png │ ├── Muffin_Red_Modelbaker_RGB.png │ ├── Logo_Red_Modelbaker_RGB_QGIS.png │ ├── Logo_Red_Modelbaker_RGB_white.png │ └── Logo_Red_Modelbaker_RGB_QGIS_white.png │ ├── long_logo │ ├── Long-Logo_Red_Modelbaker_RGB.png │ ├── Long-Logo_Red_Modelbaker_RGB_QGIS.png │ └── Long-Logo_Red_Modelbaker_RGB.svg │ └── SVG │ ├── Muffin_Red_Modelbaker_RGB.svg │ └── Logo_Red_Modelbaker_RGB.svg ├── .qgis-plugin-ci ├── .github ├── dependabot.yml └── workflows │ ├── pre-commit.yaml │ └── doc.yml ├── .docker ├── docker-compose.gh.yml └── Dockerfile ├── .pre-commit-config.yaml └── README.md /QgisModelBaker/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /QgisModelBaker/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/panel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /QgisModelBaker/yamltools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /QgisModelBaker/processing_provider/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | -------------------------------------------------------------------------------- /docs/theme_overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | -------------------------------------------------------------------------------- /docs/requirements-dev.txt: -------------------------------------------------------------------------------- 1 | ruamel.yaml==0.18.16 2 | pre-commit==4.3.0 3 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | psycopg2>=2.7.4 2 | pytest 3 | pyodbc 4 | pyyaml 5 | future 6 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs-material==9.6.22 2 | mkdocs-static-i18n==1.2.3 3 | python-slugify 4 | -------------------------------------------------------------------------------- /docs/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | template: home.html 3 | title: QGIS Model Baker Documentation 4 | --- 5 | -------------------------------------------------------------------------------- /docs/docs/index.de.md: -------------------------------------------------------------------------------- 1 | --- 2 | template: home.de.html 3 | title: QGIS Model Baker Dokumentation 4 | --- 5 | -------------------------------------------------------------------------------- /docs/docs/index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | template: home.fr.html 3 | title: QGIS Model Baker Dokumentation 4 | --- 5 | -------------------------------------------------------------------------------- /branding/Branding_2022.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/Branding_2022.pdf -------------------------------------------------------------------------------- /docs/docs/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/menu.png -------------------------------------------------------------------------------- /docs/docs/assets/toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toolbar.png -------------------------------------------------------------------------------- /.qgis-plugin-ci: -------------------------------------------------------------------------------- 1 | plugin_path: QgisModelBaker 2 | github_organization_slug: opengisch 3 | project_slug: QgisModelBaker 4 | -------------------------------------------------------------------------------- /docs/docs/assets/quick-done.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/quick-done.png -------------------------------------------------------------------------------- /docs/docs/assets/quick-fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/quick-fail.png -------------------------------------------------------------------------------- /docs/docs/assets/validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/validation.png -------------------------------------------------------------------------------- /docs/docs/assets/arrow_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/arrow_button.png -------------------------------------------------------------------------------- /docs/docs/assets/plus_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/plus_button.png -------------------------------------------------------------------------------- /docs/docs/assets/quick-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/quick-dialog.png -------------------------------------------------------------------------------- /docs/docs/assets/quick-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/quick-import.png -------------------------------------------------------------------------------- /docs/docs/assets/quick-wizard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/quick-wizard.png -------------------------------------------------------------------------------- /docs/docs/assets/settings_db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/settings_db.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_uml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_uml.png -------------------------------------------------------------------------------- /docs/docs/assets/catalogues_form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/catalogues_form.png -------------------------------------------------------------------------------- /docs/docs/assets/dataset_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/dataset_manager.png -------------------------------------------------------------------------------- /docs/docs/assets/oid_tid_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/oid_tid_manager.png -------------------------------------------------------------------------------- /docs/docs/assets/plugin_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/plugin_manager.png -------------------------------------------------------------------------------- /docs/docs/assets/settings_ili2db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/settings_ili2db.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_style.png -------------------------------------------------------------------------------- /docs/docs/assets/upgrade_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/upgrade_create.png -------------------------------------------------------------------------------- /docs/docs/assets/checkmark_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/checkmark_button.png -------------------------------------------------------------------------------- /docs/docs/assets/dataset_selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/dataset_selector.png -------------------------------------------------------------------------------- /docs/docs/assets/drag_arrows_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/drag_arrows_button.png -------------------------------------------------------------------------------- /docs/docs/assets/generated_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/generated_project.png -------------------------------------------------------------------------------- /docs/docs/assets/oid_physical_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/oid_physical_data.png -------------------------------------------------------------------------------- /docs/docs/assets/settings_general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/settings_general.png -------------------------------------------------------------------------------- /docs/docs/assets/settings_interlis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/settings_interlis.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_localrepo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_localrepo.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_save_qml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_save_qml.png -------------------------------------------------------------------------------- /docs/docs/assets/transifex-projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/transifex-projects.png -------------------------------------------------------------------------------- /docs/docs/assets/validation_verbose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/validation_verbose.png -------------------------------------------------------------------------------- /QgisModelBaker/images/file_types/data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/QgisModelBaker/images/file_types/data.png -------------------------------------------------------------------------------- /QgisModelBaker/images/file_types/ili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/QgisModelBaker/images/file_types/ili.png -------------------------------------------------------------------------------- /QgisModelBaker/images/file_types/xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/QgisModelBaker/images/file_types/xml.png -------------------------------------------------------------------------------- /QgisModelBaker/images/file_types/xtf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/QgisModelBaker/images/file_types/xtf.png -------------------------------------------------------------------------------- /branding/fonts/AvenirNextLTPro-BoldCn.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/fonts/AvenirNextLTPro-BoldCn.otf -------------------------------------------------------------------------------- /docs/docs/assets/extended-models-hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/extended-models-hide.png -------------------------------------------------------------------------------- /docs/docs/assets/extended-models-none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/extended-models-none.png -------------------------------------------------------------------------------- /docs/docs/assets/file_browser_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/file_browser_button.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_multimodels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_multimodels.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_qgis_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_qgis_legend.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_raw_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_raw_import.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_toml_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_toml_config.png -------------------------------------------------------------------------------- /docs/docs/assets/transifex-translate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/transifex-translate.png -------------------------------------------------------------------------------- /docs/docs/assets/upgrade_export_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/upgrade_export_data.png -------------------------------------------------------------------------------- /docs/docs/assets/upgrade_import_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/upgrade_import_data.png -------------------------------------------------------------------------------- /QgisModelBaker/images/file_types/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/QgisModelBaker/images/file_types/model.png -------------------------------------------------------------------------------- /branding/fonts/ClassicGrotesquePro-SmBd.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/fonts/ClassicGrotesquePro-SmBd.otf -------------------------------------------------------------------------------- /docs/docs/assets/baskets_dataset_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/baskets_dataset_manager.png -------------------------------------------------------------------------------- /docs/docs/assets/dataset_basket_manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/dataset_basket_manager.png -------------------------------------------------------------------------------- /docs/docs/assets/extended-models-group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/extended-models-group.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-layer.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-model.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-repo.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_ili2dboptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_ili2dboptions.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_legend_entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_legend_entry.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_uml_modelbaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_uml_modelbaker.png -------------------------------------------------------------------------------- /docs/docs/assets/transifex-search-mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/transifex-search-mask.png -------------------------------------------------------------------------------- /docs/docs/assets/transifex-translating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/transifex-translating.png -------------------------------------------------------------------------------- /docs/docs/assets/upgrade_import_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/upgrade_import_schema.png -------------------------------------------------------------------------------- /docs/docs/assets/validation_configfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/validation_configfile.png -------------------------------------------------------------------------------- /docs/docs/assets/validation_exportmodels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/validation_exportmodels.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_intro.png -------------------------------------------------------------------------------- /docs/docs/assets/catalogues_relationeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/catalogues_relationeditor.png -------------------------------------------------------------------------------- /docs/docs/assets/catalogues_treevalidation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/catalogues_treevalidation.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-ili2db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-ili2db.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-project.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-target.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_exporter_target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_exporter_target.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_original_project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_original_project.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings_raw_import_toml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings_raw_import_toml.png -------------------------------------------------------------------------------- /docs/docs/assets/transifex-join-requested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/transifex-join-requested.png -------------------------------------------------------------------------------- /branding/logo/PNG/Logo_Green_Modelbaker_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/PNG/Logo_Green_Modelbaker_RGB.png -------------------------------------------------------------------------------- /branding/logo/PNG/Muffin_Green_Modelbaker_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/PNG/Muffin_Green_Modelbaker_RGB.png -------------------------------------------------------------------------------- /docs/docs/assets/catalogues_withoutvalidation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/catalogues_withoutvalidation.png -------------------------------------------------------------------------------- /docs/docs/assets/dataset_relation_reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/dataset_relation_reference.png -------------------------------------------------------------------------------- /docs/docs/assets/extended-models-baskets-all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/extended-models-baskets-all.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-abstract-metaconfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-abstract-metaconfig.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-generated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-generated.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-reference.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_data_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_data_import.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_export_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_export_data.png -------------------------------------------------------------------------------- /docs/docs/assets/validation_skipgeometryerrors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/validation_skipgeometryerrors.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_ili2db_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_ili2db_options.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_schema_import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_schema_import.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_schema_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_schema_session.png -------------------------------------------------------------------------------- /branding/logo/PNG/Logo_Green_Modelbaker_RGB_QGIS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/PNG/Logo_Green_Modelbaker_RGB_QGIS.png -------------------------------------------------------------------------------- /branding/logo/PNG/Logo_Green_Modelbaker_RGB_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/PNG/Logo_Green_Modelbaker_RGB_white.png -------------------------------------------------------------------------------- /docs/docs/assets/dataset_relation_reference_domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/dataset_relation_reference_domain.png -------------------------------------------------------------------------------- /docs/docs/assets/extended-models-baskets-relevant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/extended-models-baskets-relevant.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-abstract-modelselection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-abstract-modelselection.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-abstract-projecttopping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-abstract-projecttopping.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-abstract-referenceddata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-abstract-referenceddata.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-abstract-toppingdownload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-abstract-toppingdownload.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-layer-styleicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-layer-styleicon.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_db_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_db_configuration.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_export_data_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_export_data_base.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_source_selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_source_selection.png -------------------------------------------------------------------------------- /branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB.png -------------------------------------------------------------------------------- /docs/docs/assets/meta_attributes_relation_reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/meta_attributes_relation_reference.png -------------------------------------------------------------------------------- /docs/docs/assets/toppings-exporter-additive-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/toppings-exporter-additive-settings.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_project_generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_project_generation.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_tid_generator_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_tid_generator_page.png -------------------------------------------------------------------------------- /branding/logo/PNG/Logo_Green_Modelbaker_RGB_QGIS_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/PNG/Logo_Green_Modelbaker_RGB_QGIS_white.png -------------------------------------------------------------------------------- /branding/logo/long_logo/Long-Logo_Green_Modelbaker_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/long_logo/Long-Logo_Green_Modelbaker_RGB.png -------------------------------------------------------------------------------- /branding/logo_inofficial/PNG/Muffin_Red_Modelbaker_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/PNG/Muffin_Red_Modelbaker_RGB.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_default_baskets_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_default_baskets_page.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_schema_import_tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_schema_import_tooltip.png -------------------------------------------------------------------------------- /branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB_QGIS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB_QGIS.png -------------------------------------------------------------------------------- /branding/logo/long_logo/Long-Logo_Green_Modelbaker_RGB_QGIS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo/long_logo/Long-Logo_Green_Modelbaker_RGB_QGIS.png -------------------------------------------------------------------------------- /branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB_white.png -------------------------------------------------------------------------------- /docs/docs/assets/workflow_wizard_schema_import_linked_models.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/docs/docs/assets/workflow_wizard_schema_import_linked_models.png -------------------------------------------------------------------------------- /branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB_QGIS_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/PNG/Logo_Red_Modelbaker_RGB_QGIS_white.png -------------------------------------------------------------------------------- /branding/logo_inofficial/long_logo/Long-Logo_Red_Modelbaker_RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/long_logo/Long-Logo_Red_Modelbaker_RGB.png -------------------------------------------------------------------------------- /branding/logo_inofficial/long_logo/Long-Logo_Red_Modelbaker_RGB_QGIS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengisch/QgisModelBaker/HEAD/branding/logo_inofficial/long_logo/Long-Logo_Red_Modelbaker_RGB_QGIS.png -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "monthly" 7 | 8 | - package-ecosystem: "pip" 9 | directory: "docs/" 10 | schedule: 11 | interval: "monthly" 12 | -------------------------------------------------------------------------------- /.github/workflows/pre-commit.yaml: -------------------------------------------------------------------------------- 1 | name: pre-commit 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: [master] 7 | 8 | jobs: 9 | pre-commit: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v5 13 | - uses: pre-commit/action@v3.0.1 14 | -------------------------------------------------------------------------------- /.docker/docker-compose.gh.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | qgis: 4 | build: 5 | context: .. 6 | dockerfile: ./.docker/Dockerfile 7 | args: 8 | QGIS_TEST_VERSION: ${QGIS_TEST_VERSION} 9 | tty: true 10 | volumes: 11 | - ${GITHUB_WORKSPACE}:/usr/src 12 | -------------------------------------------------------------------------------- /docs/docs/background_info/faq.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | Q: Why t_basket columns are created for `STRUCTURE` tables? Since those entries belong to objects anyway, they have already the basket of the owner object. 6 | 7 | A: So it's easier (e.g. for ili2db) to delete all data of a basket... 8 | -------------------------------------------------------------------------------- /docs/docs/about/development.md: -------------------------------------------------------------------------------- 1 | This project is open source under the terms of the GPLv2 or later and the [frontend source (plugin)](https://github.com/opengisch/QgisModelBaker) and [backend source (library)](https://github.com/opengisch/QgisModelBakerLibrary) code can be found on github. Check out the backend library as python package on [PYPI](https://pypi.org/project/modelbaker/). 2 | 3 | This plugin is developed by [OPENGIS.ch](https://www.opengis.ch) in collaboration with [Agencia de Implementación (BSF-Swissphoto AG / INCIGE S.A.S.)](https://www.proadmintierra.info/). 4 | -------------------------------------------------------------------------------- /.docker/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG QGIS_TEST_VERSION=latest 2 | FROM qgis/qgis:${QGIS_TEST_VERSION} 3 | 4 | RUN apt-get update && \ 5 | apt-get -y install openjdk-8-jre \ 6 | && rm -rf /var/lib/apt/lists/* 7 | 8 | # Useful only in 3.22 and 3.28: drop when not need anymore 9 | RUN apt-get update && apt-get -y install python3-pip python3-venv python3-pytest python3-wheel 10 | 11 | ENV VIRTUAL_ENV=/opt/venv 12 | RUN python3 -m venv --system-site-packages $VIRTUAL_ENV 13 | ENV PATH="$VIRTUAL_ENV/bin:$PATH" 14 | 15 | COPY ./requirements.txt /tmp/ 16 | RUN pip3 install -r /tmp/requirements.txt 17 | 18 | WORKDIR / 19 | -------------------------------------------------------------------------------- /docs/theme_overrides/404.html: -------------------------------------------------------------------------------- 1 | {% extends "main.html" %} 2 | {% block tabs %} 3 | {{ super() }} 4 | 10 |
11 |
12 |
13 |
14 |

15 |

404 - Not found

16 |

17 | Maybe you landed here because you used a link to the old documentation. 18 |

19 |

20 | Check out the new one! 21 |

22 |
23 |
24 |
25 |
26 | {% endblock %} 27 | {% block content %}{% endblock %} 28 | {% block footer %}{% endblock %} 29 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/create_baskets.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CreateBasketDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 900 10 | 294 11 | 12 | 13 | 14 | Create Baskets 15 | 16 | 17 | 18 | 19 | 20 | QDialogButtonBox::Cancel|QDialogButtonBox::Save 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /QgisModelBaker/metadata.txt: -------------------------------------------------------------------------------- 1 | [general] 2 | name=Model Baker 3 | description=Model Baker creates QGIS projects from models or database schemas 4 | version=dev 5 | icon=images/QgisModelBaker-icon.svg 6 | qgisMinimumVersion=3.16 7 | qgisMaximumVersion=4.99 8 | supportsQt6=True 9 | author=OPENGIS.ch GmbH in collaboration with SwissTierras Colombia 10 | email=info@opengis.ch 11 | about=Model Baker (previously QgsProjectGenerator) creates QGIS projects from INTERLIS models, PostGIS database schemas or GeoPackages. It preconfigures layers, widgets, relations and much more based on meta information available from models. 12 | tags=model,schema,postgres,postgis,geopackage,gpkg,interlis,ili,xtf,projectgenerator,project,modelbaker,QgisModelBaker 13 | tracker=https://github.com/opengisch/QgisModelBaker/issues 14 | repository=https://github.com/opengisch/QgisModelBaker 15 | homepage=https://modelbaker.ch 16 | experimental=False 17 | deprecated=False 18 | plugin_dependencies=Linking Relation Editor 19 | -------------------------------------------------------------------------------- /docs/docs/background_info/upgrade_3_to_4.md: -------------------------------------------------------------------------------- 1 | If you have databases created with ili2db of version 3, you may see a message like this: 2 | 3 | ![upgrade_create](../assets/upgrade_create.png) 4 | 5 | Databases created with ili2db version 3 are still supported by Model Baker, but it's suggested to upgrade them to the currently used version 4 of ili2db. 6 | 7 | It's super easy to do that with Model Baker. 8 | 9 | ## 1. Export Data 10 | 11 | First export your data to an XTF file. 12 | 13 | ![upgrade_export_data](../assets/upgrade_export_data.png) 14 | 15 | It's exported with ili2db 4, but with the paramter `--export3`, enabling the export of the databases created with ili2db 3. 16 | 17 | ## 2. Create Database 18 | 19 | Create your database according to the selected models. 20 | 21 | ![upgrade_import_schema](../assets/upgrade_import_schema.png) 22 | 23 | It's imported with ili2db 4. Your database is now on the current state of version 4. 24 | 25 | ## 3. Import Data 26 | 27 | Import your data back again. 28 | 29 | ![upgrade_import_data](../assets/upgrade_import_data.png) 30 | 31 | And it's done. 32 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | 2 | repos: 3 | # Fix end of files 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v3.2.0 6 | hooks: 7 | - id: trailing-whitespace 8 | - id: end-of-file-fixer 9 | - id: mixed-line-ending 10 | args: 11 | - '--fix=lf' 12 | 13 | # Remove unused imports/variables 14 | - repo: https://github.com/myint/autoflake 15 | rev: v2.3.1 16 | hooks: 17 | - id: autoflake 18 | args: 19 | - "--in-place" 20 | - "--remove-all-unused-imports" 21 | - "--remove-unused-variable" 22 | - "--ignore-init-module-imports" 23 | 24 | # Sort imports 25 | - repo: https://github.com/pycqa/isort 26 | rev: "5.11.5" 27 | hooks: 28 | - id: isort 29 | args: 30 | - --profile 31 | - black 32 | 33 | # Black formatting 34 | - repo: https://github.com/psf/black 35 | rev: 22.3.0 36 | hooks: 37 | - id: black 38 | 39 | # Automatically upgrade syntax for newer versions 40 | - repo: https://github.com/asottile/pyupgrade 41 | rev: v3.3.1 42 | hooks: 43 | - id: pyupgrade 44 | -------------------------------------------------------------------------------- /docs/demodata/TheCityAndTheCity_V1.ili: -------------------------------------------------------------------------------- 1 | INTERLIS 2.3; 2 | 3 | MODEL City_V1 (en) 4 | AT "https://modelbaker.ch" 5 | VERSION "2020-06-22" = 6 | IMPORTS GeometryCHLV95_V1; 7 | 8 | DOMAIN 9 | Line = POLYLINE WITH (STRAIGHTS) VERTEX GeometryCHLV95_V1.Coord2; 10 | Surface = SURFACE WITH (STRAIGHTS) VERTEX GeometryCHLV95_V1.Coord2 WITHOUT OVERLAPS > 0.005; 11 | 12 | STRUCTURE Address = 13 | Street: TEXT; 14 | Number: TEXT; 15 | END Address; 16 | 17 | TOPIC Constructions = 18 | BASKET OID AS INTERLIS.UUIDOID; 19 | OID AS INTERLIS.UUIDOID; 20 | 21 | CLASS Buildings = 22 | Address : Address; 23 | Description : TEXT*99; 24 | Geometry : Surface; 25 | END Buildings; 26 | 27 | CLASS Street = 28 | Name : MANDATORY TEXT*99; 29 | Geometry : Line; 30 | END Street; 31 | 32 | END Constructions; 33 | 34 | TOPIC Nature = 35 | BASKET OID AS INTERLIS.UUIDOID; 36 | OID AS INTERLIS.UUIDOID; 37 | 38 | CLASS Parks = 39 | Name : MANDATORY TEXT*99; 40 | Address : Address; 41 | Geometry: Surface; 42 | END Parks; 43 | 44 | END Nature; 45 | 46 | END City_V1. 47 | -------------------------------------------------------------------------------- /docs/docs/about/translation.md: -------------------------------------------------------------------------------- 1 | This project (Plugin and documentation) can be translated into any language. 2 | 3 | Your language is missing? Then feel free to contribute! 4 | 5 | # How to get started 6 | 7 | 1. Log in to [Transifex](https://app.transifex.com/) 8 | 9 | Then go to *Join another organization* 10 | 11 | 2. In the search mask, enter “qgis model baker”. You will be taken to [this page](https://explore.transifex.com/search/?q=model%20baker) 12 | 13 | ![search-mask](../assets/transifex-search-mask.png) 14 | 15 | 3. Select the project you want to translate and select *Join this project*, you will be taken back to your dashboard: 16 | 17 | ![join-requested](../assets/transifex-join-requested.png) 18 | 19 | Now someone from OPENGIS.ch must accept. If nothing happens, it's best to write an e-mail. 20 | 21 | 4. If your request has been accepted, the projects are available to you: 22 | 23 | ![projects](../assets/transifex-projects.png) 24 | 25 | 5. You are ready to go. Select *Translate* 26 | 27 | ![translate](../assets/transifex-translate.png) 28 | 29 | 6. And now you can translate. 30 | 31 | ![translating](../assets/transifex-translating.png) 32 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/gpkg_settings_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 498 10 | 300 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | Browse GeoPackage files 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | Database File 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /QgisModelBaker/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 2015-05-20 5 | git sha : :%H$ 6 | copyright : (C) 2015 by OPENGIS.ch 7 | email : info@opengis.ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | 21 | def classFactory(iface): 22 | from .qgismodelbaker import QgisModelBakerPlugin 23 | 24 | return QgisModelBakerPlugin(iface) 25 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/basket_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | basket_panel 4 | 5 | 6 | 7 | 0 8 | 0 9 | 797 10 | 443 11 | 12 | 13 | 14 | Basket Configuration 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | QAbstractItemView::SingleSelection 33 | 34 | 35 | QAbstractItemView::SelectRows 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/layer_tids_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | layer_tids_layout 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1127 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | QAbstractItemView::NoSelection 33 | 34 | 35 | false 36 | 37 | 38 | false 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/tid_manager.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | tid_manager 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 604 11 | 12 | 13 | 14 | OID Manager 15 | 16 | 17 | 18 | 19 | 20 | 6 21 | 22 | 23 | 24 | 25 | 26 | 27 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 28 | 29 | 30 | 31 | 32 | 33 | 34 | Define the default expression values used for the t_ili_tid field in the attribute forms according to the OID definition from the INTERLIS model. 35 | 36 | 37 | true 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /QgisModelBaker/utils/mssql_utils.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | begin : 18/06/19 4 | git sha : :%H$ 5 | copyright : (C) 2019 by Yesid Polania (BSF Swissphoto) 6 | email : yesidpol.3@gmail.com 7 | ***************************************************************************/ 8 | 9 | /*************************************************************************** 10 | * * 11 | * This program is free software; you can redistribute it and/or modify * 12 | * it under the terms of the GNU General Public License as published by * 13 | * the Free Software Foundation; either version 2 of the License, or * 14 | * (at your option) any later version. * 15 | * * 16 | ***************************************************************************/ 17 | """ 18 | import re 19 | 20 | import pyodbc 21 | 22 | regex_list = ["sql.*server", "mssql", "FreeTDS"] 23 | 24 | 25 | def get_odbc_drivers(): 26 | result = list() 27 | for item in pyodbc.drivers(): 28 | regex_sql_server = "({})".format("|".join(regex_list)) 29 | 30 | x = re.search(regex_sql_server, item, re.IGNORECASE) 31 | 32 | if x: 33 | result.append(item) 34 | 35 | return result 36 | -------------------------------------------------------------------------------- /QgisModelBaker/processing_provider/provider.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from qgis.core import QgsProcessingProvider 4 | from qgis.PyQt.QtGui import QIcon 5 | 6 | from QgisModelBaker.libs.modelbaker.processing.ili2db_exporting import ( 7 | ExportingGPKGAlgorithm, 8 | ExportingPGAlgorithm, 9 | ) 10 | from QgisModelBaker.libs.modelbaker.processing.ili2db_importing import ( 11 | ImportingGPKGAlgorithm, 12 | ImportingPGAlgorithm, 13 | ) 14 | from QgisModelBaker.libs.modelbaker.processing.ili2db_validating import ( 15 | ValidatingGPKGAlgorithm, 16 | ValidatingPGAlgorithm, 17 | ) 18 | from QgisModelBaker.libs.modelbaker.processing.util_layersourceparsing import ( 19 | LayerSourceParsingAlgorithm, 20 | ) 21 | 22 | 23 | class Provider(QgsProcessingProvider): 24 | def loadAlgorithms(self): 25 | self.addAlgorithm(ImportingPGAlgorithm()) 26 | self.addAlgorithm(ImportingGPKGAlgorithm()) 27 | self.addAlgorithm(ExportingPGAlgorithm()) 28 | self.addAlgorithm(ExportingGPKGAlgorithm()) 29 | self.addAlgorithm(ValidatingPGAlgorithm()) 30 | self.addAlgorithm(ValidatingGPKGAlgorithm()) 31 | self.addAlgorithm(LayerSourceParsingAlgorithm()) 32 | 33 | def id(self) -> str: 34 | return "modelbaker" 35 | 36 | def name(self) -> str: 37 | return self.tr("Model Baker") 38 | 39 | def icon(self) -> QIcon: 40 | return QIcon( 41 | os.path.join(os.path.dirname(__file__), "../images/QgisModelBaker-icon.svg") 42 | ) 43 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/workflow_wizard/session_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | session_layout 4 | 5 | 6 | 7 | 0 8 | 0 9 | 686 10 | 68 11 | 12 | 13 | 14 | Generate Project 15 | 16 | 17 | 18 | 19 | 20 | TextLabel 21 | 22 | 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 0 33 | 34 | 35 | 36 | 37 | 38 | 39 | ... 40 | 41 | 42 | QToolButton::MenuButtonPopup 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/panel/db_panel_utils.py: -------------------------------------------------------------------------------- 1 | from QgisModelBaker.gui.panel.db_config_panel import DbActionType, DbConfigPanel 2 | from QgisModelBaker.libs.modelbaker.iliwrapper.globals import DbIliMode 3 | 4 | available_database_config_panels = dict() 5 | 6 | try: 7 | from QgisModelBaker.gui.panel.pg_config_panel import PgConfigPanel 8 | 9 | available_database_config_panels.update({DbIliMode.pg: PgConfigPanel}) 10 | except ModuleNotFoundError: 11 | pass 12 | try: 13 | from QgisModelBaker.gui.panel.gpkg_config_panel import GpkgConfigPanel 14 | 15 | available_database_config_panels.update({DbIliMode.gpkg: GpkgConfigPanel}) 16 | except ModuleNotFoundError: 17 | pass 18 | try: 19 | from QgisModelBaker.gui.panel.mssql_config_panel import MssqlConfigPanel 20 | 21 | available_database_config_panels.update({DbIliMode.mssql: MssqlConfigPanel}) 22 | except ModuleNotFoundError: 23 | pass 24 | 25 | # Get panel depending on DB 26 | def get_config_panel(tool, parent, db_action_type: DbActionType) -> DbConfigPanel: 27 | """Returns an instance of a panel where users to fill out connection parameters to database. 28 | :param parent: The parent of this widget. 29 | :param db_action_type: The action type of QgisModelBaker that will be executed. 30 | :type db_action_type: :class:`DbActionType` 31 | :return: A panel where users to fill out connection parameters to database. 32 | :rtype: :class:`DbConfigPanel` 33 | """ 34 | if tool in available_database_config_panels: 35 | return available_database_config_panels[tool](parent, db_action_type) 36 | 37 | return None 38 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/edit_command.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 27.08.2020 5 | git sha : :%H$ 6 | copyright : (C) 2020 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | from qgis.gui import QgsGui 20 | from qgis.PyQt.QtWidgets import QDialog, QDialogButtonBox 21 | 22 | from QgisModelBaker.utils import gui_utils 23 | 24 | DIALOG_UI = gui_utils.get_ui_class("edit_command.ui") 25 | 26 | 27 | class EditCommandDialog(QDialog, DIALOG_UI): 28 | def __init__(self, parent=None): 29 | QDialog.__init__(self, parent) 30 | self.setupUi(self) 31 | QgsGui.instance().enableAutoGeometryRestore(self) 32 | self.button_box.button(QDialogButtonBox.StandardButton.Ok).setText( 33 | self.tr("Run") 34 | ) 35 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/workflow_wizard/tid_configuration.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | tid_configuration 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | 21 | 0 22 | 0 23 | 24 | 25 | 26 | 27 | 75 28 | true 29 | 30 | 31 | 32 | <html><head/><body><p>Define the default expression values used for the t_ili_tid field in the attribute forms according to the OID definition from the INTERLIS model.</p></body></html> 33 | 34 | 35 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 36 | 37 | 38 | true 39 | 40 | 41 | 42 | 43 | 44 | 45 | QLayout::SetMaximumSize 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /docs/demodata/GL_Wildruhezonen_V1_2020-03-31.ili: -------------------------------------------------------------------------------- 1 | INTERLIS 2.3; 2 | 3 | !! Version | Modification 4 | !!---------------------------------------------------------------------------------------- 5 | !! 2020-03-13 | Erste Modellversion; Import/Erweiterung MGDM BAFU 6 | 7 | !!@ IDGeoIV="195.1, 195.2" 8 | !!@ technicalContact=mailto:geoinformation@gl.ch 9 | !!@ furtherInformation=https://models.geo.gl.ch/pdf/GL_Wildruhezonen_V1.pdf 10 | MODEL GL_Wildruhezonen_Codelisten_V1 (de) 11 | AT "https://www.gl.ch" 12 | VERSION "2020-03-13" = 13 | IMPORTS CatalogueObjects_V1,Wildruhezonen_Codelisten_V2_1; 14 | 15 | TOPIC Codelisten EXTENDS Wildruhezonen_Codelisten_V2_1.Codelisten = 16 | 17 | /** Katalog der Zielarten Schutzbestimmung */ 18 | CLASS Zielarten_Catalogue EXTENDS CatalogueObjects_V1.Catalogues.Item = 19 | /** Bezeichnung der Zielarten */ 20 | Bezeichnung : MANDATORY TEXT; 21 | END Zielarten_Catalogue; 22 | 23 | STRUCTURE Zielarten_CatRef EXTENDS CatalogueObjects_V1.Catalogues.MandatoryCatalogueReference = 24 | Reference (EXTENDED) : MANDATORY REFERENCE TO (EXTERNAL) Zielarten_Catalogue; 25 | END Zielarten_CatRef; 26 | 27 | END Codelisten; 28 | 29 | END GL_Wildruhezonen_Codelisten_V1. 30 | 31 | 32 | !!@ IDGeoIV="195.1, 195.2" 33 | !!@ technicalContact=mailto:geoinformation@gl.ch 34 | !!@ furtherInformation=https://models.geo.gl.ch/pdf/GL_Wildruhezonen_V1.pdf 35 | MODEL GL_Wildruhezonen_V1 (de) 36 | AT "https://www.gl.ch" 37 | VERSION "2020-03-13" = 38 | IMPORTS GL_Wildruhezonen_Codelisten_V1,Wildruhezonen_LV95_V2_1; 39 | 40 | TOPIC Wildruhezonen EXTENDS Wildruhezonen_LV95_V2_1.Wildruhezonen = 41 | OID AS INTERLIS.UUIDOID; 42 | DEPENDS ON GL_Wildruhezonen_Codelisten_V1.Codelisten; 43 | 44 | CLASS Wildruhezone (EXTENDED) = 45 | /** Zuordnung der Zielarten Schutzbestimmung zur Wildruhezone */ 46 | Zielart: GL_Wildruhezonen_Codelisten_V1.Codelisten.Zielarten_CatRef; 47 | END Wildruhezone; 48 | 49 | END Wildruhezonen; 50 | 51 | END GL_Wildruhezonen_V1. 52 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/tid_configurator_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | tid_configuration 4 | 5 | 6 | 7 | 0 8 | 0 9 | 797 10 | 443 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | QLayout::SetMaximumSize 33 | 34 | 35 | 36 | 37 | 38 | 39 | QLayout::SetMinimumSize 40 | 41 | 42 | 43 | 44 | 45 | 46 | Reset Values 47 | 48 | 49 | 50 | 51 | 52 | 53 | Qt::Horizontal 54 | 55 | 56 | 57 | 40 58 | 20 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/filter_data_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 605 10 | 123 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | Select all models 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | SpaceCheckListView 54 | 55 |
QgisModelBaker.utils.gui_utils
56 | 1 57 |
58 | 59 | SemiTristateCheckbox 60 | QWidget 61 |
QgisModelBaker.utils.gui_utils
62 |
63 |
64 | 65 | 66 |
67 | -------------------------------------------------------------------------------- /docs/docs/user_guide/quick_visualizer.md: -------------------------------------------------------------------------------- 1 | The quick visualizer feature lets you instantly view your data—whether it’s valid or not. 2 | 3 | ## Why Quick Visualizer? 4 | 5 | Since the GDAL driver does not support INTERLIS 2.4 and thus the simple drag-and-drop in QGIS to view the data from an XTF is no longer provided, the quick visualizer fills this gap. 6 | 7 | It generates a GeoPackage in the temporary directory without constraints and imports the data without any validation. 8 | 9 | !!! Note 10 | If no configuration is made for custom model repositories, the models are collected from the usual http://model.interlis.ch and the xtf directory (the directory from which the stored files originate). If there is a custom model directory, it checks this and, if it does not find the model, automatically adds the xtf directory. 11 | 12 | ## Step-by-Step 13 | 14 | When dropping files, besides the dialog asking whether you generally want to open such files with Model Baker, the following dialog appears: 15 | 16 | ![quick-dialog](../assets/quick-dialog.png) 17 | 18 | Here you can decide to use the "normal" Wizard to continue or to visualize your data quickly. If you decide to visualize quickly, the files are imported (without constraints and validations) and the layers are created. 19 | 20 | You get the status in the message bar. 21 | 22 | ![quick-import](../assets/quick-import.png) 23 | 24 | And finally the feedback. 25 | 26 | ![quick-done](../assets/quick-done.png) 27 | 28 | Or if there are troubles (like e.g. no model available), you get a negative feedback with a button to check the log files. 29 | 30 | ![quick-fail](../assets/quick-fail.png) 31 | 32 | If you choose to use the wizard (or you opened the wizard manually (without dropping files)) you still can start the Quick Visualizer with the newly added button. 33 | 34 | ![quick-wizard](../assets/quick-wizard.png) 35 | 36 | !!! Note 37 | This means, if you mostly use the wizard and get annoyed by the first dialog, you can select there *always open wizard* and you will come directly to the wizard on file drop and you still have the posility to quickly visualize. 38 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/topping_wizard/generation.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterlisImport 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | Qt::Horizontal 21 | 22 | 23 | 24 | 584 25 | 20 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | Generate Topping Files 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 0 49 | 0 50 | 51 | 52 | 53 | 54 | 75 55 | true 56 | 57 | 58 | 59 | Makedy Bakedy Tasty Toppings... 60 | 61 | 62 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 63 | 64 | 65 | true 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/theme_overrides/home.html: -------------------------------------------------------------------------------- 1 | {% extends "main.html" %} 2 | {% block tabs %} 3 | {{ super() }} 4 | 17 |
18 |
19 |
20 |
21 |

22 | QGIS Model Baker 23 |

24 | Model Baker is a QGIS plugin that allows to 25 | quickly create a QGIS project from a physical data model. Moreover it lets you import, export, and validate INTERLIS models and data into QGIS using graphical control of the ili2db tools. 28 |

29 |

30 | Model Baker uses ili2db to import 31 | an INTERLIS model into a physical database and the database structure as well as the provided metainformation 32 | to configure the QGIS project with layer tree, field widgets, form layouts, relations and much more. This 33 | automation can massively reduce the configuration effort. 34 |

35 |

36 | Furthermore, Model Baker can be used as a framework for other projects. The plugin 38 | Asistente LADM-COL, created for the 39 | Colombian implementation of the Land Administration Domain Model 40 | (LADM), uses the backend of Model Baker as a library 41 | to implement as much of the specific solution as possible as QGIS core functionality. 42 |

43 |
44 |
45 |
46 |
47 | {% endblock %} 48 | {% block content %}{% endblock %} 49 | {% block footer %}{% endblock %} 50 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/basket_manager.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | BasketManager 4 | 5 | 6 | 7 | 0 8 | 0 9 | 855 10 | 288 11 | 12 | 13 | 14 | Basket Manager 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Edit the selected basket 26 | 27 | 28 | Edit Basket 29 | 30 | 31 | 32 | 33 | 34 | 35 | Delete the selected basket 36 | 37 | 38 | Delete Basket 39 | 40 | 41 | 42 | 43 | 44 | 45 | Create a basket for the current dataset 46 | 47 | 48 | Create Basket 49 | 50 | 51 | 52 | 53 | 54 | 55 | Qt::Horizontal 56 | 57 | 58 | 59 | 40 60 | 20 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | QDialogButtonBox::Ok 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/edit_dataset_name.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | EditDatasetDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 588 10 | 74 11 | 12 | 13 | 14 | Edit dataset 15 | 16 | 17 | 18 | 19 | 20 | Dataset 21 | 22 | 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | Qt::Horizontal 31 | 32 | 33 | QDialogButtonBox::Cancel 34 | 35 | 36 | 37 | 38 | 39 | 40 | Ok 41 | 42 | 43 | true 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | button_box 56 | accepted() 57 | EditDatasetDialog 58 | accept() 59 | 60 | 61 | 248 62 | 254 63 | 64 | 65 | 157 66 | 274 67 | 68 | 69 | 70 | 71 | button_box 72 | rejected() 73 | EditDatasetDialog 74 | reject() 75 | 76 | 77 | 316 78 | 260 79 | 80 | 81 | 286 82 | 274 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/workflow_wizard/intro.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterlisImport 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | Export data from an existing database 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 75 35 | true 36 | 37 | 38 | 39 | What do you want to do? 40 | 41 | 42 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 43 | 44 | 45 | true 46 | 47 | 48 | 49 | 50 | 51 | 52 | Generate a QGIS Project from an existing database 53 | 54 | 55 | 56 | 57 | 58 | 59 | Qt::Vertical 60 | 61 | 62 | 63 | 20 64 | 40 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | Choose data files and models to import or generate a new database 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /docs/theme_overrides/home.de.html: -------------------------------------------------------------------------------- 1 | {% extends "main.html" %} 2 | {% block tabs %} 3 | {{ super() }} 4 | 17 |
18 |
19 |
20 |
21 |

22 | QGIS Model Baker 23 |

24 | Model Baker ist ein QGIS plugin, welches das 25 | schnelle Erstellen von QGIS Projekten aus physischen Datenmodellen erlaubt. Ausserdem lässt es mittels 26 | graphischen Ansteuerung der ili2db 27 | Tools INTERLIS Modelle und Daten bequem in QGIS importieren, 28 | exportieren und validieren. 29 |

30 |

31 | Model Baker verwendet ili2db, um 32 | ein INTERLIS-Modell in eine physische Datenbank zu importieren und die vorhandene Datenstruktur sowie 33 | Metainformationen für die Konfiguration des QGIS Projekts mit Legende, Formularlayouts, Relationen und vielem 34 | mehr. Diese Automatisierung reduziert den Konfigurationsaufwand massiv. 35 |

36 |

37 | Ausserdem kann Model Baker als Framework 38 | für andere Projekte verwendet werden. Das Plugin Asistente LADM-COL, das für die kolumbianische Implementierung des Land Administration Domain Model 41 | (LADM) erstellt wurde, verwendet das Backend von Model 42 | Baker als Bibliothek, um so viel wie möglich von der spezifischen Lösung als QGIS-Kernfunktionalität zu 43 | implementieren. 44 |

45 |
46 |
47 |
48 |
49 | {% endblock %} 50 | {% block content %}{% endblock %} 51 | {% block footer %}{% endblock %} 52 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/drop_message.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DropMessage 4 | 5 | 6 | 7 | 0 8 | 0 9 | 680 10 | 112 11 | 12 | 13 | 14 | Use Model Baker to Handle Files 15 | 16 | 17 | 18 | 19 | 20 | Qt::Horizontal 21 | 22 | 23 | QDialogButtonBox::No|QDialogButtonBox::Yes 24 | 25 | 26 | 27 | 28 | 29 | 30 | Do you want to use the Model Baker plugin to handle XTF/ ITF files? 31 | 32 | 33 | true 34 | 35 | 36 | 37 | 38 | 39 | 40 | Remember my decision and don't ask me again (you can undo this in the Model Baker settings) 41 | 42 | 43 | 44 | 45 | 46 | 47 | button_box 48 | 49 | 50 | 51 | 52 | button_box 53 | accepted() 54 | DropMessage 55 | accept() 56 | 57 | 58 | 248 59 | 254 60 | 61 | 62 | 157 63 | 274 64 | 65 | 66 | 67 | 68 | button_box 69 | rejected() 70 | DropMessage 71 | reject() 72 | 73 | 74 | 316 75 | 260 76 | 77 | 78 | 286 79 | 274 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/set_sequence_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | set_sequence_layout 4 | 5 | 6 | 7 | 0 8 | 0 9 | 744 10 | 99 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | <html><head/><body><p>With this option you reset the technical sequence id on the database. </p><p>Do it only when you know what you are about to do.</p></body></html> 33 | 34 | 35 | Reset the technical sequence used as t_id value 36 | 37 | 38 | true 39 | 40 | 41 | false 42 | 43 | 44 | 45 | 46 | 47 | T_Id (Sequence) Value 48 | 49 | 50 | 51 | 52 | 53 | 54 | 2147483647 55 | 56 | 57 | 58 | 59 | 60 | 61 | Use logins from settings (superuser) for this operation 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/docs/background_info/repositories.md: -------------------------------------------------------------------------------- 1 | ## What is a Geodata Repository? 2 | 3 | In Model Baker, implemented INTERLIS models can be found automatically via the web. These repositories are, in addition to the federal repository, also a large number of cantonal repositories. Thus, the models of the entire Swiss Geodata Catalog, which are available in INTERLIS format, are available to us in Model Baker. 4 | 5 | 6 | ## Structure 7 | 8 | http://models.interlis.ch serves as entry point. The file `ilimodels.xml` is the index over all the models that can be found on the same server. 9 | Other repositories/servers can be linked in `ilisites.xml`. With this a network of repositories are provided were models can be found. 10 | ### ilimodels.xml 11 | The file data are based on the INTERLIS model `IliRepository09`. It contains objects of the class `ModelMetadata` where a model name and a file path is defined. Those files are on the same sever/repository. 12 | 13 | ``` 14 | 15 | Wildruhezonen_LV95_V2_1 16 | ili2_3 17 | BAFU/Wildruhezonen_V2_1.ili 18 | 2020-04-21 19 | 2020-04-21 20 | 21 | [...] 22 | 23 | Wildruhezonen_Codelisten_V2_1 24 | 25 | 26 | 2020-01-23 27 | 195.1,195.2 28 | https://models.geo.admin.ch/BAFU/ 29 | mailto:gis@bafu.admin.ch 30 | https://www.bafu.admin.ch/geodatenmodelle 31 | fe4b13eee175fb7eaf558534cdf2b7a8 32 | 33 | ``` 34 | 35 | ### ilisites.xml 36 | The file data are based on the INTERLIS model `IliSite09`. It contains objects of the class `SiteMetadata` where a path to another repository is defined. 37 | 38 | ``` 39 | http://models.interlis.ch/ilisite.xml 40 | |- http://models.geo.admin.ch/ilisite.xml 41 | |- http://models.geo.kgk-cgc.ch/ilisite.xml 42 | |- http://models.geo.ai.ch/ilisite.xml 43 | |- http://models.geo.ai.ch/ilisite.xml 44 | |- https://models.geo.ar.ch/ilisite.xml 45 | |- http://models.geo.be.ch/ilisite.xml 46 | |- http://models.geo.bl.ch/ilisite.xml 47 | |- ... 48 | |- https://repositorio.proadmintierra.info/ilisite.xml 49 | ``` 50 | -------------------------------------------------------------------------------- /docs/docs/user_guide/plugin_configuration.md: -------------------------------------------------------------------------------- 1 | Go to menu *Database > Model Baker > Settings*. 2 | 3 | ## General Settings 4 | ![general settings](../assets/settings_general.png) 5 | 6 | In keeping with aristotle, unnecessary settings are avoided. Still there are some. 7 | 8 | The first *checkbox* is to avoid / enforce opening a popup when dropping XTF/ITF or ILI files in QGIS main window to ask if you want to handle them in the Model Baker or not. 9 | 10 | The second is to skip the dialog asking you to import the file directly with Quick Viewer. 11 | 12 | ## Database Settings 13 | 14 | ![db settings](../assets/settings_db.png) 15 | 16 | In the *Database Login* you can set username and password to use it as superuser login to excecute data management tasks. 17 | 18 | The button *Generally used custom DB parameters* provides you a map to enter specific parameters passed to ili2db via a temporary file to `--dbparams`. 19 | These settings are used on every ili2pg command (including validation). They are not considered in the QGIS project. The possible parameters are described in the respective [JDBC driver](https://jdbc.postgresql.org/documentation/use/#connection-parameters). 20 | 21 | ## INTERLIS Settings 22 | 23 | ![interlis settings](../assets/settings_interlis.png) 24 | 25 | ### Custom Model Directories 26 | 27 | In this window you can set one or several paths to let ili2db where to find your INTERLIS models (ili files). Paths can be both local directories or URLs to remote model repositories. Several paths should be separated by semicolons. 28 | 29 | By default, ili2db uses `%ILI_FROM_DB;%XTF_DIR;http://models.interlis.ch/;%JAR_DIR`, where: 30 | 31 | - `%ILI_FROM_DB` is a placeholder for the models in the database (in table t_ili2db_model), 32 | - `%XTF_DIR` is a placeholder for the directory with the transfer file, 33 | - `%JAR_DIR` is a placeholder for the ili2db program (ili2pg.jar or ili2gpkg.jar file). 34 | 35 | ### Java Path 36 | 37 | By default, Model Baker searches for Java executable in `%JAVA_HOME` environment variable. However, you can overwrite such behavior by setting a custom path to Java executable file in this window. This is useful, for instance, when environment variables are not well set and you have no rights to set them in your machine's operating system. 38 | 39 | ## ili2db Command Information 40 | 41 | ![ili2db settings](../assets/settings_ili2db.png) 42 | 43 | This section is to show all the parameters set by the Model Baker Library per default on ili2db commands. In the plugin they are modified. 44 | -------------------------------------------------------------------------------- /docs/scripts/transifex_utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import glob 4 | import os 5 | 6 | from slugify import slugify 7 | 8 | TX_ORGANIZATION = "opengisch" 9 | TX_PROJECT = "qgis-model-baker-docs" 10 | TX_SOURCE_LANG = "en" 11 | TX_TYPE = "GITHUBMARKDOWN" 12 | 13 | 14 | def create_transifex_config(): 15 | """Parse all source documentation files and add the ones with tx_slug metadata 16 | defined to transifex config file. 17 | """ 18 | print("Start creating transifex configuration") 19 | 20 | current_dir = os.path.dirname(os.path.abspath(__file__)) 21 | config_file = os.path.join(current_dir, "..", ".tx", "config") 22 | root = os.path.join(current_dir, "..") 23 | count = 0 24 | 25 | with open(config_file, "w") as f: 26 | f.write("[main]\n") 27 | f.write("host = https://www.transifex.com\n\n") 28 | 29 | if os.path.isfile(f"{root}/mkdocs_tx.yml"): 30 | print(f"Found mkdocs config translated content") 31 | f.write(f"[o:{TX_ORGANIZATION}:p:{TX_PROJECT}:r:site_navigation]\n") 32 | f.write("resource_name = site navigation\n") 33 | f.write("file_filter = mkdocs_tx..yml\n") 34 | f.write(f"source_file = mkdocs_tx.yml\n") 35 | f.write(f"source_lang = {TX_SOURCE_LANG}\n") 36 | f.write(f"type = YAML_GENERIC\n\n") 37 | else: 38 | print("No translation of mkdocs config found") 39 | 40 | for file in glob.iglob(current_dir + "/../docs/**/*.md", recursive=True): 41 | # Get relative path of file 42 | relative_path = os.path.relpath(file, start=root) 43 | 44 | tx_slug = slugify(os.path.splitext(relative_path)[0]) 45 | 46 | if ( 47 | tx_slug and relative_path.count(".") == 1 48 | ): # if no dots defining language (to filter out the indes.de.md etc.) 49 | print(f"Found file with tx_slug defined: {relative_path}, {tx_slug}") 50 | f.write(f"[o:{TX_ORGANIZATION}:p:{TX_PROJECT}:r:{tx_slug}]\n") 51 | f.write( 52 | f"file_filter = {os.path.splitext(relative_path)[0]}..md\n" 53 | ) 54 | f.write(f"source_file = {relative_path}\n") 55 | f.write(f"source_lang = {TX_SOURCE_LANG}\n") 56 | f.write(f"type = {TX_TYPE}\n\n") 57 | count += 1 58 | 59 | print(f"Transifex configuration created: {count} resources added.") 60 | 61 | 62 | create_transifex_config() 63 | -------------------------------------------------------------------------------- /docs/theme_overrides/home.fr.html: -------------------------------------------------------------------------------- 1 | {% extends "main.html" %} 2 | {% block tabs %} 3 | {{ super() }} 4 | 17 |
18 |
19 |
20 |
21 |

22 | QGIS Model Baker 23 |

24 | Model Baker est un plugin QGIS qui permet de 25 | créer rapidement un projet QGIS à partir d'un modèle de données physique. De plus, il vous permet d'importer, d'exporter et de valider des modèles et des données INTERLIS dans QGIS en utilisant le contrôle graphique des outils ili2db. 28 |

29 |

30 | Model Baker utilise ili2db pour importer 31 | un modèle INTERLIS dans une base de données physique et la structure de la base de données ainsi que les méta-informations fournies 32 | pour configurer le projet QGIS avec l'arborescence des couches, les widgets de champs, les mises en page de formulaires, les relations et bien plus encore. Cette 33 | automatisation peut réduire considérablement l'effort de configuration. 34 |

35 |

36 | De plus, Model Baker peut être utilisé comme un framework pour d'autres projets. Le plugin 38 | Asistente LADM-COL, créé pour la 39 | mise en œuvre colombienne du modèle de domaine d'administration foncière 40 | (LADM), utilise le backend de Model Baker comme bibliothèque 41 | pour implémenter autant que possible la solution spécifique en tant que fonctionnalité de base de QGIS. 42 |

43 |
44 |
45 |
46 |
47 | {% endblock %} 48 | {% block content %}{% endblock %} 49 | {% block footer %}{% endblock %} 50 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/export_models_panel.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | 7 | 0 8 | 0 9 | 603 10 | 176 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Form 21 | 22 | 23 | 24 | 0 25 | 26 | 27 | 0 28 | 29 | 30 | 0 31 | 32 | 33 | 0 34 | 35 | 36 | 37 | 38 | <html><head/><body><p>If your data is in the format of the cantonal model, but you want to export it in the format of the national model.</p><p>Usually, this is one single model. However, it is also possible to pass multiple models, which makes sense if there are multiple base models in the schema you want to export.</p><p>This is the value passed to <span style=" font-family:'monospace';">--exportModels</span></p></body></html> 39 | 40 | 41 | Export the data in a model other than the one where it is stored 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 0 50 | 0 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | SpaceCheckListView 60 | 61 |
QgisModelBaker.utils.gui_utils
62 | 1 63 |
64 |
65 | 66 | 67 |
68 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/drop_quick_message.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DropQuickMessage 4 | 5 | 6 | 7 | 0 8 | 0 9 | 887 10 | 112 11 | 12 | 13 | 14 | Quick Visualizer or Wizard 15 | 16 | 17 | 18 | 19 | 20 | Qt::Horizontal 21 | 22 | 23 | QDialogButtonBox::NoButton 24 | 25 | 26 | 27 | 28 | 29 | 30 | Would you like to quickly visualize these files, or would you prefer to create a structured database using the Model Baker Wizard? 31 | 32 | 33 | true 34 | 35 | 36 | 37 | 38 | 39 | 40 | Always open the Model Baker Wizard and don't ask me again (you can undo this in the Model Baker settings) 41 | 42 | 43 | 44 | 45 | 46 | 47 | button_box 48 | 49 | 50 | 51 | 52 | button_box 53 | accepted() 54 | DropQuickMessage 55 | accept() 56 | 57 | 58 | 248 59 | 254 60 | 61 | 62 | 157 63 | 274 64 | 65 | 66 | 67 | 68 | button_box 69 | rejected() 70 | DropQuickMessage 71 | reject() 72 | 73 | 74 | 316 75 | 260 76 | 77 | 78 | 286 79 | 274 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/workflow_wizard/execution.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterlisImport 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | Run all the ili2db sessions 21 | 22 | 23 | 24 | 25 | 26 | 27 | Qt::Horizontal 28 | 29 | 30 | 31 | 40 32 | 20 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 0 42 | 0 43 | 44 | 45 | 46 | 47 | 75 48 | true 49 | 50 | 51 | 52 | Run the ili2db sessions to make the imports. 53 | 54 | 55 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 56 | 57 | 58 | true 59 | 60 | 61 | 62 | 63 | 64 | 65 | Qt::ScrollBarAlwaysOff 66 | 67 | 68 | true 69 | 70 | 71 | 72 | 73 | 0 74 | 0 75 | 780 76 | 515 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Read the documentation](https://img.shields.io/badge/Read-the%20docs-green.svg)](https://opengisch.github.io/QgisModelBaker/) 2 | [![Release](https://img.shields.io/github/release/opengisch/QgisModelBaker.svg)](https://github.com/opengisch/QgisModelBaker/releases) 3 | [![Build Status](https://travis-ci.org/opengisch/QgisModelBaker.svg?branch=master)](https://travis-ci.com/opengisch/QgisModelBaker) 4 | 5 | ![logo](branding/logo/long_logo/Long-Logo_Green_Modelbaker_RGB_QGIS.png) 6 | 7 | This is a QGIS plugin to quickly generate [QGIS](https://www.qgis.org) projects 8 | from an existing model with a few mouseclicks. 9 | 10 | Configuring QGIS layers and forms manually is a tedious and error prone process. 11 | This plugin loads database schemas with various meta information to preconfigure the 12 | layer tree, widget configuration, relations and more. 13 | 14 | [INTERLIS](https://en.wikipedia.org/wiki/INTERLIS) models contain more information than a plain database schema. This 15 | plugin uses [ili2pg](https://github.com/claeis/ili2db#ili2db---importsexports-interlis-transfer-files-to-a-sql-db) to import an INTERLIS model into a PostGIS database and uses 16 | the additional meta information to configure the user interface even better. 17 | 18 | [Read the documentation](https://opengisch.github.io/QgisModelBaker/) for more information. 19 | 20 | ## Translating the plugin 21 | 22 | We love to be multilingual! 23 | 24 | Translating the plugin is done on 25 | [Transifex](https://explore.transifex.com/search/?q=model%20baker). If 26 | you would like to help translating this plugin into an existing or a new language, 27 | please create a Transifex account and request access to the team. Find the documentation [here](https://opengisch.github.io/QgisModelBaker/about/translation/) 28 | 29 | ## Infos for Devs 30 | 31 | ### The modelbaker library 32 | 33 | The whole backend library used by this plugin here can be found [here](https://github.com/opengisch/QgisModelBakerLibrary). It's distributed on [PYPI as a package](https://pypi.org/project/modelbaker/) as well. 34 | 35 | ### Code style 36 | 37 | Is enforced with pre-commit. To use, make: 38 | ``` 39 | pip install pre-commit 40 | pre-commit install 41 | ``` 42 | And to run it over all the files (with infile changes): 43 | ``` 44 | pre-commit run --color=always --all-file 45 | ``` 46 | 47 | ### Needed packages from PyPI 48 | 49 | Needed packages from PyPI are downloaded and packaged on deployment to the plugin's libs folder. 50 | 51 | Run the script to download and unpack them or install them to your system. 52 | 53 | Script: 54 | ``` 55 | ./scripts/package_pip_packages.sh 56 | ``` 57 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/topping_wizard/generation_page.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 2022-08-01 5 | git sha : :%H$ 6 | copyright : (C) 2022 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | from qgis.core import QgsProject 21 | from qgis.PyQt.QtWidgets import QWizardPage 22 | 23 | import QgisModelBaker.utils.gui_utils as gui_utils 24 | from QgisModelBaker.utils import gui_utils 25 | 26 | PAGE_UI = gui_utils.get_ui_class("topping_wizard/generation.ui") 27 | 28 | 29 | class GenerationPage(QWizardPage, PAGE_UI): 30 | def __init__(self, parent, title): 31 | QWizardPage.__init__(self) 32 | 33 | self.topping_wizard = parent 34 | 35 | self.setupUi(self) 36 | 37 | self.setTitle(title) 38 | self.setStyleSheet(gui_utils.DEFAULT_STYLE) 39 | self.info_text_box.setStyleSheet( 40 | f"background-color: lightgray; color: #35322f;" 41 | ) 42 | self.run_generate_button.clicked.connect(self.generate) 43 | 44 | def generate(self): 45 | result_message = "" 46 | ilidata_file = self.topping_wizard.topping.makeit(QgsProject.instance()) 47 | if ilidata_file: 48 | self.progress_bar.setValue(100) 49 | result_message = self.tr("Toppings generated 🧁") 50 | self.info_text_box.setHtml(f"Find the ilidata.xml here:\n\n{ilidata_file}") 51 | else: 52 | self.progress_bar.setValue(0) 53 | result_message = self.tr("Toppings not generated 💩") 54 | self.progress_bar.setFormat(result_message) 55 | self.progress_bar.setTextVisible(True) 56 | self.topping_wizard.log_panel.print_info( 57 | result_message, gui_utils.LogLevel.SUCCESS 58 | ) 59 | -------------------------------------------------------------------------------- /docs/docs/user_guide/export_workflow.md: -------------------------------------------------------------------------------- 1 | You can export your data from an physical database into an `xtf` file (INTERLIS transfer file). 2 | 3 | The wizard is started over the toolbar icon or *Database > Model Baker > Import/Export Wizard*. 4 | 5 | ![wizard intro](../assets/workflow_wizard_intro.png) 6 | 7 | Select *Export data from an existing database*. 8 | 9 | ## 1. Database Selection 10 | 11 | First you have to select the database schema or file to export your data from. 12 | 13 | ![wizard db configuration](../assets/workflow_wizard_db_configuration.png) 14 | 15 | For more detailed description of the connection parameters, see the description in the [import workflow](../import_workflow/#database-selection) 16 | 17 | When the database or the schema / file does not exist, a warning will appear. 18 | 19 | ## 2. Export data 20 | 21 | ![wizard export data](../assets/workflow_wizard_export_data.png) 22 | 23 | ### XTF File 24 | 25 | Set the `xtf` file where you want to export your data to. 26 | 27 | ### Filters 28 | 29 | You can filter the data *either* by models *or* - if the database considers [Dataset and Basket Handling](../../background_info/basket_handling/) - by datasets *or* baskets. You can choose multiple models/datasets/baskets. But only one kind of filter (`--model`, `--dataset`, `--basket`) is given to the ili2db command (it would make no conjunction (AND) but a disjunction (OR) if multiple parameters are given (what is not really used). A conjunction can still be done by selecting the smallest instance (baskets)). 30 | 31 | ### Export Models 32 | 33 | The export models do not define the data that should be exported, but in what *format* they should be exported. This is relevant if you use *extended* models: You have your data stored in your extended model, but you export it in the *format* of the base model. 34 | 35 | ![export base](../assets/workflow_wizard_export_data_base.png) 36 | 37 | !!! Note 38 | When no model is selected, the data are exported in the format of the model it is saved in. Multiple model selection makes sense here, when you have multiple models extended. 39 | 40 | ## 3. Run ili2db Sessions 41 | 42 | In the next step you can run the export in one single ili2db command. 43 | 44 | With the ![run arrow_button](../assets/arrow_button.png) button next to *Run* the options are provided to run the command without any validation of your data or to edit the command manually before running it. 45 | 46 | ### Data Validation 47 | 48 | If you did not choose *Run without constraints* on your export session, then the data are validated against their INTERLIS models. If this validation did not succeed, then the export will fail. 49 | 50 | To check your data in advance against the INTERLIS model, use the [Model Baker Validator](../validation/). 51 | -------------------------------------------------------------------------------- /docs/demodata/GL_Wildruhezonen_Zielarten.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Schalenwild und Raufusshühner 6 | Raufusshühner 7 | Schalenwild 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/edit_command.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | EditCommandDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1343 10 | 270 11 | 12 | 13 | 14 | Edit command 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Qt::Horizontal 24 | 25 | 26 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 27 | 28 | 29 | 30 | 31 | 32 | 33 | <html><head/><body><p>Edit the command below to customize the command for ili2db. More information can be found in the <a href="https://github.com/claeis/ili2db/blob/master/docs/ili2db.rst"><span style=" text-decoration: underline; color:#0000ff;">ili2db documentation</span></a>.<br/>Please note that QGIS Model Baker is optimized for the default ili2db parameters. If these parameters are modified, QGIS Model Baker might encounter problems and not provide the best results.</p></body></html> 34 | 35 | 36 | true 37 | 38 | 39 | 40 | 41 | 42 | 43 | button_box 44 | 45 | 46 | 47 | 48 | button_box 49 | accepted() 50 | EditCommandDialog 51 | accept() 52 | 53 | 54 | 248 55 | 254 56 | 57 | 58 | 157 59 | 274 60 | 61 | 62 | 63 | 64 | button_box 65 | rejected() 66 | EditCommandDialog 67 | reject() 68 | 69 | 70 | 316 71 | 260 72 | 73 | 74 | 286 75 | 274 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /QgisModelBaker/utils/globals.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 16.12.2021 5 | git sha : :%H$ 6 | copyright : (C) 2021 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | from enum import Enum 21 | 22 | from qgis.PyQt.QtCore import QCoreApplication 23 | 24 | from QgisModelBaker.libs.modelbaker.iliwrapper.globals import DbIliMode 25 | from QgisModelBaker.libs.modelbaker.utils.globals import DbActionType 26 | 27 | CRS_PATTERNS = {"LV95": 2056, "LV03": 21781} 28 | 29 | DEFAULT_DATASETNAME = "Baseset" 30 | CATALOGUE_DATASETNAME = "Catalogueset" 31 | 32 | displayDbIliMode = { 33 | DbIliMode.pg: QCoreApplication.translate("QgisModelBaker", "PostGIS"), 34 | DbIliMode.gpkg: QCoreApplication.translate("QgisModelBaker", "GeoPackage"), 35 | DbIliMode.mssql: QCoreApplication.translate("QgisModelBaker", "SQL Server"), 36 | DbIliMode.ili: QCoreApplication.translate("QgisModelBaker", "INTERLIS"), 37 | DbIliMode.ili2pg: QCoreApplication.translate( 38 | "QgisModelBaker", "INTERLIS (use PostGIS)" 39 | ), 40 | DbIliMode.ili2gpkg: QCoreApplication.translate( 41 | "QgisModelBaker", "INTERLIS (use GeoPackage)" 42 | ), 43 | DbIliMode.ili2mssql: QCoreApplication.translate( 44 | "QgisModelBaker", "INTERLIS (use SQL Server)" 45 | ), 46 | } 47 | 48 | displayLanguages = { 49 | "en": QCoreApplication.translate("QgisModelBaker", "English"), 50 | "de": QCoreApplication.translate("QgisModelBaker", "German"), 51 | "fr": QCoreApplication.translate("QgisModelBaker", "French"), 52 | "it": QCoreApplication.translate("QgisModelBaker", "Italian"), 53 | "rm": QCoreApplication.translate("QgisModelBaker", "Romansh"), 54 | } 55 | 56 | 57 | class AdministrativeDBActionTypes(Enum): 58 | """Defines constants for modelbaker actions that require superuser login""" 59 | 60 | SCHEMA_IMPORT = DbActionType.SCHEMA_IMPORT 61 | IMPORT_DATA = DbActionType.IMPORT_DATA 62 | -------------------------------------------------------------------------------- /.github/workflows/doc.yml: -------------------------------------------------------------------------------- 1 | name: doc 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | paths: 7 | - 'docs/**' 8 | - '.github/workflows/doc.yml' 9 | push: 10 | branches: 11 | - master 12 | paths: 13 | - 'docs/**' 14 | - '.github/workflows/doc.yml' 15 | workflow_dispatch: # useful for testing tx pushes 16 | 17 | 18 | defaults: 19 | run: 20 | working-directory: docs 21 | 22 | jobs: 23 | deploy: 24 | runs-on: ubuntu-latest 25 | env: 26 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 27 | steps: 28 | - name: Checkout 29 | uses: actions/checkout@v5 30 | 31 | - name: Checkout Python 32 | uses: actions/setup-python@v5 33 | with: 34 | python-version: '3.10' 35 | 36 | - name: Install Python requirements 37 | run: | 38 | pip install -r requirements.txt 39 | pip install -r requirements-dev.txt 40 | 41 | - name: Install Transifex client 42 | run: | 43 | curl -OL https://github.com/transifex/cli/releases/download/v1.6.10/tx-linux-amd64.tar.gz 44 | tar -xvzf tx-linux-amd64.tar.gz 45 | 46 | - name: Extract translatable content from mkdocs.yml config 47 | run: ./scripts/mkdocs_tx.py create_source 48 | 49 | - name: Configure Transifex 50 | run: scripts/transifex_utils.py 51 | env: 52 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 53 | 54 | - name: Push source files to Transifex 55 | if: ${{ github.event_name != 'pull_request' }} 56 | run: ./tx push 57 | env: 58 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 59 | 60 | - name: Pull translations from Transifex 61 | if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) || ${{ github.event_name == 'pull_request' && github.repository == 'opengisch/QgisModelBaker' }} 62 | run: | 63 | ./tx pull --translations --all --minimum-perc 10 64 | ./tx status 65 | env: 66 | TX_TOKEN: ${{ secrets.TX_TOKEN }} 67 | 68 | - name: Translate Mkdocs config 69 | if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) || ${{ github.event_name == 'pull_request' && github.repository == 'opengisch/QgisModelBaker' }} 70 | run: | 71 | ./scripts/mkdocs_tx.py -s en update_config 72 | ./scripts/mkdocs_tx_commit.sh 73 | env: 74 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 75 | 76 | - name: Build documentation 77 | run: mkdocs build 78 | 79 | - uses: actions/upload-artifact@v5 80 | if: ${{ github.event_name == 'pull_request' }} 81 | with: 82 | name: docs 83 | path: docs/site 84 | if-no-files-found: error 85 | 86 | - name: Deploy to GitHub Pages 87 | if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) 88 | run: mkdocs gh-deploy --force 89 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/topping_wizard/layers.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterlisImport 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | 21 | 0 22 | 0 23 | 24 | 25 | 26 | 27 | 75 28 | true 29 | 30 | 31 | 32 | The layertree and the layerorder are exported as configured in the QGIS project. 33 | Choose if styles should be exported and which style categories (form, symbology, variables etc.) should be used. 34 | As well as in what way the layer source should be stored (None, if it's loaded from INTERLIS). 35 | 36 | 37 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 38 | 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | 47 | <html><head/><body><p><span style=" font-size:large; color:#9bcade;">▪ </span>INTERLIS Layers, <span style=" font-size:large; color:#a1de9b;">▪ </span>other Layers</p></body></html> 48 | 49 | 50 | Qt::RichText 51 | 52 | 53 | 54 | 55 | 56 | 57 | Qt::Horizontal 58 | 59 | 60 | 61 | 454 62 | 20 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | Reset 71 | 72 | 73 | 74 | 75 | 76 | 77 | true 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/docs/user_guide/get_started.md: -------------------------------------------------------------------------------- 1 | ## Installation 2 | 3 | 1. [Install QGIS 3](https://qgis.org/en/site/forusers/download.html) 4 | 5 | 2. Use the plugin manager to install the "Model Baker" plugin. 6 | 7 | ![Plugin Manager](../assets/plugin_manager.png) 8 | 9 | 10 | ## The Model Baker Functionalities 11 | 12 | After the installation you can find all the Features in the *Database > Model Baker* menu. 13 | 14 | ![menu](../assets/menu.png) 15 | 16 | ### Import / Export Wizard 17 | 18 | The wizard contains all the functionalities to create database schemas from INTERLIS models, import / export transferdata and generate QGIS projects from the database. It leads you through the process with all the possiblities you have with the single dialogs. 19 | 20 | ![workflow_wizard_intro](../assets/workflow_wizard_intro.png) 21 | 22 | Find a guide through the [import and generate process with the wizard](../import_workflow/) and through the [export process with the wizard](../export_workflow/) in this documentation. 23 | 24 | ### Data Validator 25 | 26 | The Data Validator provides you the possiblity to check the data currently open in your QGIS against an INTERLIS model. You can open the validator panel as well over *View > Panels > Model Baker Data Validator*. 27 | 28 | ![validation](../assets/validation.png) 29 | 30 | See for more information about it [Validate Data](../user_guide/validation.md) 31 | 32 | ### Dataset Manager 33 | 34 | The dataset manager provides you the possiblity to create and rename datasets and generate the baskets for the datasets. 35 | 36 | ![dataset-manager](../assets/dataset_basket_manager.png) 37 | 38 | More information you can find in the [Dataset and Basket Handling](../background_info/basket_handling.md) 39 | 40 | ### OID Manager 41 | 42 | With the OID Manager you can view and set the handling of the OIDs in the current project like the default value expressions and their visibility. 43 | 44 | ![oid-mangaer](../assets/oid_tid_manager.png) 45 | 46 | Find further information about [OIDs in general and the OID Manager](../background_info/oid_tid_generator.md) 47 | 48 | ### Topping Exporter 49 | 50 | In case you plan to create your own [UsabILIty Topping set](../background_info/toppings/modelbaker_integration.md), then you can use the [Topping Exporter](../user_guide/topping_exporter.md). 51 | 52 | ![toppings-exporter](../assets/toppings_exporter_target.png) 53 | 54 | ### Settings 55 | 56 | In keeping with aristotle, unnecessary settings are avoided. Still there are some. Find it in [Plugin Configuration](plugin_configuration.md). 57 | 58 | ![settings](../assets/settings_general.png) 59 | 60 | ### Show Log Folder 61 | 62 | To view all Model Baker or ili2db logs, view the files in the corresponding folder. 63 | 64 | ## The Model Baker Toolbar 65 | 66 | Some functionalities are available in the toolbar as well, like the Import / Export Wizard and the Dataset Manager. 67 | 68 | ![toolbar](../assets/toolbar.png) 69 | 70 | The dropdown box there is used to work with the datasets during digitizing / editing data. See for more information the [Dataset and Basket Handling](../background_info/basket_handling.md) 71 | -------------------------------------------------------------------------------- /QgisModelBaker/metaproject.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 8.11.2016 5 | git sha : :%H$ 6 | copyright : (C) 2016 by OPENGIS.ch 7 | email : matthias@opengis.ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | import argparse 21 | import importlib 22 | import sys 23 | 24 | import yaml 25 | from qgis.core import QgsApplication, QgsProject 26 | 27 | from QgisModelBaker.libs.modelbaker.dataobjects.project import Project 28 | 29 | 30 | def main(argv): 31 | parser = argparse.ArgumentParser( 32 | "Generate QGIS projects or QGIS dataobjects yaml templates." 33 | ) 34 | parser.add_argument( 35 | "--generator", type=str, help="The generator to use. (Example: postgres)" 36 | ) 37 | parser.add_argument( 38 | "--uri", 39 | type=str, 40 | help="Database uri, used as db entry point. (Example: service=pg_qgep)", 41 | ) 42 | parser.add_argument( 43 | "out", 44 | type=str, 45 | help="Path to the generated dataobjects. (Example: /home/qgis/my_project)", 46 | ) 47 | 48 | args = parser.parse_args() 49 | 50 | # Initialize qgis libraries 51 | QgsApplication([], True) 52 | QgsApplication.initQgis() 53 | 54 | def debug_log_message(message, tag, level): 55 | print("{}({}): {}".format(tag, level, message)) 56 | 57 | QgsApplication.instance().messageLog().messageReceived.connect(debug_log_message) 58 | 59 | generator_module = importlib.import_module("generator." + args.generator) 60 | 61 | generator = generator_module.Generator(args.uri) 62 | 63 | available_layers = generator.layers() 64 | relations, _ = generator.relations(available_layers) 65 | 66 | project = Project() 67 | project.layers = available_layers 68 | project.relations = relations 69 | 70 | qgis_project = QgsProject.instance() 71 | project.create(args.out, qgis_project) 72 | 73 | yamlfile = args.out + ".yaml" 74 | with open(yamlfile, "w") as f: 75 | f.write(yaml.dump(project.dump(), default_flow_style=False)) 76 | print("Project template written to {}".format(yamlfile)) 77 | 78 | QgsApplication.exitQgis() 79 | 80 | 81 | if __name__ == "__main__": 82 | # execute only if run as a script 83 | main(sys.argv[1:]) 84 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/topping_wizard/layer_style_categories.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | LayerStyleCategoriesDialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 431 10 | 537 11 | 12 | 13 | 14 | Layer Style Categories 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Ok 24 | 25 | 26 | true 27 | 28 | 29 | 30 | 31 | 32 | 33 | Deselect All 34 | 35 | 36 | 37 | 38 | 39 | 40 | Select All 41 | 42 | 43 | 44 | 45 | 46 | 47 | Qt::Horizontal 48 | 49 | 50 | QDialogButtonBox::Cancel 51 | 52 | 53 | 54 | 55 | 56 | 57 | Qt::Horizontal 58 | 59 | 60 | 61 | 40 62 | 20 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | button_box 73 | accepted() 74 | LayerStyleCategoriesDialog 75 | accept() 76 | 77 | 78 | 248 79 | 254 80 | 81 | 82 | 157 83 | 274 84 | 85 | 86 | 87 | 88 | button_box 89 | rejected() 90 | LayerStyleCategoriesDialog 91 | reject() 92 | 93 | 94 | 316 95 | 260 96 | 97 | 98 | 286 99 | 274 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/create_baskets.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 10.08.2021 5 | git sha : :%H$ 6 | copyright : (C) 2021 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | from qgis.PyQt.QtWidgets import QDialog, QMessageBox 21 | 22 | from QgisModelBaker.gui.panel.create_basket_panel import CreateBasketPanel 23 | from QgisModelBaker.utils import gui_utils 24 | 25 | DIALOG_UI = gui_utils.get_ui_class("create_baskets.ui") 26 | 27 | 28 | class CreateBasketDialog(QDialog, DIALOG_UI): 29 | def __init__(self, parent=None, db_connector=None, datasetname=None): 30 | QDialog.__init__(self, parent) 31 | self.setupUi(self) 32 | 33 | self.datasetname = datasetname 34 | self.db_connector = db_connector 35 | 36 | self.buttonBox.accepted.connect(self._accepted) 37 | self.buttonBox.rejected.connect(self._rejected) 38 | 39 | # baskets part 40 | self.baskets_panel = CreateBasketPanel(self) 41 | self.baskets_layout.addWidget(self.baskets_panel) 42 | 43 | self.baskets_panel.load_basket_config(self.db_connector, self.datasetname) 44 | 45 | def baskets_can_be_created(self): 46 | # Check if any (non-existing) basket was added, otherwise 47 | # inform that no other baskets can be created for this dataset 48 | return len(self.baskets_panel.bid_model.basket_settings) 49 | 50 | def _accepted(self): 51 | feedbacks = self.baskets_panel.save_basket_config( 52 | self.db_connector, self.datasetname 53 | ) 54 | negative_feedbacks = [ 55 | feedback for feedback in feedbacks if feedback[0] is False 56 | ] 57 | if negative_feedbacks: 58 | warning_box = QMessageBox(self) 59 | warning_box.setIcon(QMessageBox.Icon.Critical) 60 | warning_title = self.tr("Creating baskets failed") 61 | warning_box.setWindowTitle(warning_title) 62 | warning_box.setText( 63 | "{}{}".format( 64 | "\n".join([feedback[1] for feedback in negative_feedbacks]), 65 | "\n(The problem is often an incorrectly formatted BID)", 66 | ) 67 | ) 68 | warning_box.exec() 69 | self.close() 70 | 71 | def _rejected(self): 72 | self.close() 73 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/edit_dataset_name.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 10.08.2021 5 | git sha : :%H$ 6 | copyright : (C) 2021 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | from enum import Enum 20 | 21 | from qgis.PyQt.QtWidgets import QDialog, QMessageBox 22 | 23 | from QgisModelBaker.utils import gui_utils 24 | 25 | DIALOG_UI = gui_utils.get_ui_class("edit_dataset_name.ui") 26 | 27 | 28 | class EditDatasetDialog(QDialog, DIALOG_UI): 29 | class UpdateMode(Enum): 30 | CREATE = 1 31 | RENAME = 2 32 | 33 | def __init__(self, parent=None, db_connector=None, dataset=(None, None)): 34 | QDialog.__init__(self, parent) 35 | self.setupUi(self) 36 | 37 | self.tid, self.datasetname = dataset 38 | self.db_connector = db_connector 39 | 40 | if not self.datasetname: 41 | self.setWindowTitle(self.tr("Create Dataset")) 42 | self.ok_button.setText(self.tr("Create Dataset")) 43 | else: 44 | self.setWindowTitle(self.tr("Edit Dataset")) 45 | self.ok_button.setText(self.tr("Rename Dataset")) 46 | 47 | self.ok_button.clicked.connect(self.accepted) 48 | self.ok_button.setEnabled(False) 49 | 50 | self.dataset_line_edit.setText(self.datasetname) 51 | self.dataset_line_edit.textChanged.connect( 52 | lambda text: self.ok_button.setEnabled( 53 | len(text) and text != self.datasetname 54 | ) 55 | ) 56 | 57 | def accepted(self): 58 | new_dataset_name = self.dataset_line_edit.text() 59 | status, message = self.database_command(new_dataset_name) 60 | if not status: 61 | warning_box = QMessageBox(self) 62 | warning_box.setIcon(QMessageBox.Icon.Critical) 63 | warning_title = ( 64 | self.tr("Rename Dataset") if self.tid else self.tr("Create Dataset") 65 | ) 66 | warning_box.setWindowTitle(warning_title) 67 | warning_box.setText(message) 68 | warning_box.exec() 69 | self.close() 70 | 71 | def database_command(self, new_dataset_name): 72 | if self.tid: 73 | return self.db_connector.rename_dataset(self.tid, new_dataset_name) 74 | else: 75 | return self.db_connector.create_dataset(new_dataset_name) 76 | -------------------------------------------------------------------------------- /branding/logo_inofficial/SVG/Muffin_Red_Modelbaker_RGB.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/docs/assets/modelbaker_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /QgisModelBaker/images/QgisModelBaker-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /branding/logo/SVG/Muffin_Green_Modelbaker_RGB.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/panel/db_config_panel.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | begin : 23/04/19 4 | git sha : :%H$ 5 | copyright : (C) 2019 by Yesid Polania 6 | email : yesidpol.3@gmail.com 7 | ***************************************************************************/ 8 | 9 | /*************************************************************************** 10 | * * 11 | * This program is free software; you can redistribute it and/or modify * 12 | * it under the terms of the GNU General Public License as published by * 13 | * the Free Software Foundation; either version 2 of the License, or * 14 | * (at your option) any later version. * 15 | * * 16 | ***************************************************************************/ 17 | """ 18 | from abc import ABCMeta, abstractmethod 19 | from typing import Tuple 20 | 21 | from qgis.PyQt.QtCore import pyqtSignal 22 | from qgis.PyQt.QtWidgets import QWidget 23 | 24 | from QgisModelBaker.libs.modelbaker.iliwrapper.ili2dbconfig import ( 25 | Ili2DbCommandConfiguration, 26 | ) 27 | from QgisModelBaker.libs.modelbaker.utils.globals import DbActionType 28 | 29 | 30 | class AbstractQWidgetMeta(ABCMeta, type(QWidget)): 31 | pass 32 | 33 | 34 | class DbConfigPanel(QWidget, metaclass=AbstractQWidgetMeta): 35 | """Panel where users fill out connection parameters to database. This is a abstract class. 36 | 37 | :cvar notify_fields_modified: Signal that is called when any field is modified. 38 | :type notify_field_modified: pyqtSignal(str) 39 | """ 40 | 41 | notify_fields_modified = pyqtSignal() 42 | 43 | def __init__(self, parent: QWidget, db_action_type: DbActionType): 44 | """ 45 | :param parent: The parent of this widget. 46 | :param db_action_type: The action type of QgisModelBaker that will be executed. 47 | :type db_action_type: :class:`DbActionType` 48 | """ 49 | QWidget.__init__(self, parent) 50 | self._db_action_type = db_action_type 51 | 52 | @abstractmethod 53 | def _show_panel(self): 54 | """Shows/Hides fields or changes help text before panel is shown.""" 55 | 56 | @abstractmethod 57 | def get_fields(self, configuration: Ili2DbCommandConfiguration): 58 | """Gets panel fields into `configuration` parameter. 59 | 60 | :param configuration: Object in which the values of the panel fields will be written. 61 | :type configuration: :class:`Ili2DbCommandConfiguration` 62 | """ 63 | 64 | @abstractmethod 65 | def set_fields(self, configuration: Ili2DbCommandConfiguration): 66 | """Set panel fields from `configuration` parameter. 67 | 68 | :param configuration: Object whose instance variables will be written to the fields in the panel 69 | :type configuration: :class:`Ili2DbCommandConfiguration` 70 | """ 71 | 72 | @abstractmethod 73 | def is_valid(self) -> Tuple[bool, str]: 74 | """Checks the config panel has a minimum fields filled out. 75 | 76 | :return: *True* and empty message if the panel has a minimum fields filled out, *False* and warning message otherwise. 77 | """ 78 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/panel/log_panel.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 06.07.2021 5 | git sha : :%H$ 6 | copyright : (C) 2021 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | import logging 21 | 22 | from qgis.core import Qgis 23 | from qgis.gui import QgsMessageBar 24 | from qgis.PyQt.QtCore import QSize, Qt 25 | from qgis.PyQt.QtWidgets import ( 26 | QGridLayout, 27 | QProgressBar, 28 | QSizePolicy, 29 | QTextBrowser, 30 | QWidget, 31 | ) 32 | 33 | from QgisModelBaker.utils.gui_utils import ( 34 | LogLevel, 35 | get_parsed_log_text_level, 36 | get_text_color_object, 37 | ) 38 | 39 | 40 | class LogPanel(QWidget): 41 | def __init__(self, parent=None): 42 | QWidget.__init__(self, parent) 43 | 44 | self.logger = logging.getLogger("qgismodelbaker") 45 | self.txtStdout = QTextBrowser() 46 | self.bar = QgsMessageBar() 47 | self.bar.setSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed) 48 | self.txtStdout.setLayout(QGridLayout()) 49 | self.txtStdout.layout().setContentsMargins(0, 0, 0, 0) 50 | self.txtStdout.layout().addWidget(self.bar, 0, 0, Qt.AlignmentFlag.AlignTop) 51 | self.scrollbar = self.txtStdout.verticalScrollBar() 52 | 53 | self.busy_bar = QProgressBar() 54 | self.busy_bar.setRange(0, 0) 55 | self.busy_bar.setTextVisible(True) 56 | self.busy_bar.setVisible(False) 57 | 58 | layout = QGridLayout() 59 | layout.addWidget(self.txtStdout) 60 | layout.addWidget(self.busy_bar) 61 | 62 | self.setLayout(layout) 63 | 64 | def sizeHint(self): 65 | return QSize( 66 | self.fontMetrics().lineSpacing() * 48, self.fontMetrics().lineSpacing() * 10 67 | ) 68 | 69 | def print_info(self, text, level=LogLevel.INFO): 70 | self.txtStdout.setTextColor(get_text_color_object(level)) 71 | self.txtStdout.append(text) 72 | 73 | if level in (LogLevel.INFO, LogLevel.SUCCESS, LogLevel.TOPPING): 74 | self.logger.info(text) 75 | elif level == LogLevel.WARNING: 76 | self.logger.warning(text) 77 | elif level == LogLevel.FAIL: 78 | self.logger.error(text) 79 | 80 | def print_stdout_info(self, text): 81 | self.print_info(text, get_parsed_log_text_level(text)) 82 | 83 | def show_message(self, level, message): 84 | if level == Qgis.MessageLevel.Warning: 85 | self.bar.pushMessage(message, Qgis.MessageLevel.Info, 10) 86 | elif level == Qgis.MessageLevel.Critical: 87 | self.bar.pushMessage(message, Qgis.MessageLevel.Warning, 10) 88 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/workflow_wizard/intro_page.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 06.07.2021 5 | git sha : :%H$ 6 | copyright : (C) 2021 by Dave Signer 7 | email : david at opengis ch 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | 21 | from qgis.PyQt.QtWidgets import QWizardPage 22 | 23 | import QgisModelBaker.utils.gui_utils as gui_utils 24 | from QgisModelBaker.utils import gui_utils 25 | 26 | PAGE_UI = gui_utils.get_ui_class("workflow_wizard/intro.ui") 27 | 28 | 29 | class IntroPage(QWizardPage, PAGE_UI): 30 | def __init__(self, parent, title): 31 | QWizardPage.__init__(self) 32 | 33 | self.workflow_wizard = parent 34 | 35 | self.setupUi(self) 36 | 37 | self.setTitle(title) 38 | 39 | self.next_id = gui_utils.PageIds.ImportSourceSelection 40 | self.import_button.clicked.connect(self._on_import) 41 | self.generate_button.clicked.connect(self._on_generate) 42 | self.export_button.clicked.connect(self._on_export) 43 | 44 | def nextId(self): 45 | return self.next_id 46 | 47 | def _on_import(self): 48 | self.next_id = gui_utils.PageIds.ImportSourceSelection 49 | self.workflow_wizard.next() 50 | 51 | def _on_generate(self): 52 | self.next_id = gui_utils.PageIds.GenerateDatabaseSelection 53 | self.workflow_wizard.next() 54 | 55 | def _on_export(self): 56 | self.next_id = gui_utils.PageIds.ExportDatabaseSelection 57 | self.workflow_wizard.next() 58 | 59 | def help_text(self): 60 | logline = self.tr( 61 | "You have just opened the Workflow Wizard, now you need to choose your plans..." 62 | ) 63 | help_paragraphs = self.tr( 64 | """ 65 |

> Choose data files and models to import or generate a new database

66 |

If you want to create a physical database based on an INTERLIS model, regardless of whether it is based on an ili-file or a model from the repository.

67 |

Or if you want to import data (catalogues or user data), regardless of whether the database already exists or not.

68 |

> Generate a QGIS Project from an existing database

69 |

If you want to select a database from which to create a QGIS project.

70 |

> Export data from an existing database

71 |

If you want to export data to an XTF file.

72 | """ 73 | ) 74 | docutext = self.tr( 75 | 'Find more information about the workflow wizard in the documentation...' 76 | ) 77 | return logline, help_paragraphs, docutext 78 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/workflow_wizard/export_data_configuration.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterlisImport 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | 21 | 0 22 | 0 23 | 24 | 25 | 26 | 27 | 75 28 | true 29 | 30 | 31 | 32 | Select the file you want to export to and the models and datasets from the database 33 | 34 | 35 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 36 | 37 | 38 | true 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 0 47 | 0 48 | 49 | 50 | 51 | QFrame::StyledPanel 52 | 53 | 54 | QFrame::Raised 55 | 56 | 57 | 58 | 59 | 60 | XTF File 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | Browse XTF files 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 0 81 | 82 | 83 | 84 | 85 | 86 | 87 | 0 88 | 89 | 90 | 91 | 92 | 93 | 94 | Qt::Vertical 95 | 96 | 97 | QSizePolicy::Expanding 98 | 99 | 100 | 101 | 20 102 | 40 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/custom_model_dir.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | ------------------- 4 | begin : 11.08.2017 5 | git sha : :%H$ 6 | copyright : (C) 2017 by Sergio Ramírez (BSF-Swissphoto) 7 | email : seralra96@gmail.com 8 | ***************************************************************************/ 9 | 10 | /*************************************************************************** 11 | * * 12 | * This program is free software; you can redistribute it and/or modify * 13 | * it under the terms of the GNU General Public License as published by * 14 | * the Free Software Foundation; either version 2 of the License, or * 15 | * (at your option) any later version. * 16 | * * 17 | ***************************************************************************/ 18 | """ 19 | 20 | from qgis.gui import QgsGui 21 | from qgis.PyQt.QtCore import QCoreApplication, Qt 22 | from qgis.PyQt.QtWidgets import QDialog, QListWidgetItem 23 | 24 | from QgisModelBaker.libs.modelbaker.utils.qt_utils import selectFolder 25 | from QgisModelBaker.utils import gui_utils 26 | 27 | DIALOG_UI = gui_utils.get_ui_class("custom_model_dir.ui") 28 | 29 | 30 | class CustomModelDirDialog(QDialog, DIALOG_UI): 31 | def __init__(self, current_paths, parent=None): 32 | QDialog.__init__(self, parent) 33 | self.setupUi(self) 34 | QgsGui.instance().enableAutoGeometryRestore(self) 35 | self.parent = parent 36 | 37 | paths = current_paths.split(";") 38 | self.model_dir_list.addItems([path for path in paths if path.strip()] or [""]) 39 | for i in range(self.model_dir_list.count()): 40 | self.set_flags(self.model_dir_list.item(i)) 41 | 42 | self.model_dir_list.itemSelectionChanged.connect(self.on_selection_changed) 43 | self.on_selection_changed() 44 | 45 | self.add_button.clicked.connect(self.add_model_dir) 46 | self.remove_button.clicked.connect(self.remove_model_dir) 47 | self.browse_button.clicked.connect(self.browse_dir) 48 | self.buttonBox.accepted.connect(self.accepted) 49 | 50 | def add_model_dir(self): 51 | item = QListWidgetItem() 52 | self.set_flags(item) 53 | self.model_dir_list.addItem(item) 54 | self.model_dir_list.setCurrentItem(item) 55 | self.browse_dir() 56 | 57 | def remove_model_dir(self): 58 | for item in self.model_dir_list.selectedItems(): 59 | self.model_dir_list.takeItem(self.model_dir_list.row(item)) 60 | 61 | def accepted(self): 62 | items = [ 63 | self.model_dir_list.item(x) for x in range(self.model_dir_list.count()) 64 | ] 65 | new_paths = ";".join([i.text().strip() for i in items if i.text().strip()]) 66 | self.parent.custom_model_directories_line_edit.setText(new_paths) 67 | 68 | def browse_dir(self): 69 | selectFolder( 70 | self.model_dir_list.currentItem(), 71 | title=QCoreApplication.translate( 72 | "QgisModelBaker", "Open Folder with ili Models" 73 | ), 74 | parent=None, 75 | ) 76 | 77 | def set_flags(self, item): 78 | item.setFlags( 79 | Qt.ItemFlag.ItemIsSelectable 80 | | Qt.ItemFlag.ItemIsEditable 81 | | Qt.ItemFlag.ItemIsEnabled 82 | ) 83 | 84 | def on_selection_changed(self): 85 | enable = len(self.model_dir_list.selectedItems()) == 1 86 | self.browse_button.setEnabled(enable) 87 | self.remove_button.setEnabled(enable) 88 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/topping_wizard/additives.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Models 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1257 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | Custom Project Variables 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 0 39 | 0 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | Print Layouts (exported as templates) 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 0 56 | 0 57 | 58 | 59 | 60 | 61 | 75 62 | true 63 | 64 | 65 | 66 | Additive project settings, that should be exported (if available). Like Map Themes, Custom Variables and Print Layouts. 67 | 68 | 69 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 70 | 71 | 72 | true 73 | 74 | 75 | 76 | 77 | 78 | 79 | Map Themes 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 0 88 | 0 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Convert validation configuration file to topping file 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | SpaceCheckListView 105 | 106 |
QgisModelBaker.utils.gui_utils
107 | 1 108 |
109 |
110 | 111 | 112 |
113 | -------------------------------------------------------------------------------- /branding/logo_inofficial/SVG/Logo_Red_Modelbaker_RGB.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /branding/logo/SVG/Logo_Green_Modelbaker_RGB.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/edit_basket.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | EditBasket 4 | 5 | 6 | 7 | 0 8 | 0 9 | 482 10 | 259 11 | 12 | 13 | 14 | Edit Basket 15 | 16 | 17 | 18 | 19 | 20 | Disabled datasets already have a basket for this topic 21 | 22 | 23 | Dataset 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | Topic 34 | 35 | 36 | 37 | 38 | 39 | 40 | false 41 | 42 | 43 | 44 | 45 | 46 | true 47 | 48 | 49 | 50 | 51 | 52 | 53 | BID (OID Type) 54 | 55 | 56 | 57 | 58 | 59 | 60 | false 61 | 62 | 63 | true 64 | 65 | 66 | 67 | 68 | 69 | 70 | BID Value 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | Attachment key 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | Qt::Horizontal 91 | 92 | 93 | QDialogButtonBox::Cancel|QDialogButtonBox::Save 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | buttonBox 103 | accepted() 104 | EditBasket 105 | accept() 106 | 107 | 108 | 248 109 | 254 110 | 111 | 112 | 157 113 | 274 114 | 115 | 116 | 117 | 118 | buttonBox 119 | rejected() 120 | EditBasket 121 | reject() 122 | 123 | 124 | 316 125 | 260 126 | 127 | 128 | 286 129 | 274 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /branding/logo_inofficial/long_logo/Long-Logo_Red_Modelbaker_RGB.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /branding/logo/long_logo/Long-Logo_Green_Modelbaker_RGB.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /QgisModelBaker/gui/panel/export_models_panel.py: -------------------------------------------------------------------------------- 1 | """ 2 | /*************************************************************************** 3 | begin : 22.11.2021 4 | git sha : :%H$ 5 | copyright : (C) 2021 by Dave Signer 6 | email : david at opengis ch 7 | ***************************************************************************/ 8 | 9 | /*************************************************************************** 10 | * * 11 | * This program is free software; you can redistribute it and/or modify * 12 | * it under the terms of the GNU General Public License as published by * 13 | * the Free Software Foundation; either version 2 of the License, or * 14 | * (at your option) any later version. * 15 | * * 16 | ***************************************************************************/ 17 | """ 18 | 19 | from qgis.PyQt.QtWidgets import QWidget 20 | 21 | import QgisModelBaker.utils.gui_utils as gui_utils 22 | from QgisModelBaker.utils import gui_utils 23 | 24 | WIDGET_UI = gui_utils.get_ui_class("export_models_panel.ui") 25 | 26 | 27 | # could be renamed since it's not only model - it's dataset and basket as well 28 | class ExportModelsPanel(QWidget, WIDGET_UI): 29 | def __init__(self, parent=None): 30 | QWidget.__init__(self, parent) 31 | self.setupUi(self) 32 | self.parent = parent 33 | 34 | def setup_dialog(self, validation=False): 35 | self._generate_texts(validation) 36 | self.export_models_checkbox.setChecked(False) 37 | self.items_view.setVisible(False) 38 | 39 | if self.parent: 40 | try: 41 | self.items_view.clicked.disconnect() 42 | self.items_view.space_pressed.disconnect() 43 | except Exception: 44 | pass 45 | 46 | self.items_view.setModel(self.parent.current_export_models_model) 47 | self.items_view.clicked.connect(self.items_view.model().check) 48 | self.items_view.space_pressed.connect(self.items_view.model().check) 49 | 50 | self.export_models_checkbox.setChecked( 51 | self.parent.current_export_models_active 52 | ) 53 | self.export_models_checkbox.stateChanged.connect(self._active_state_changed) 54 | self._active_state_changed(self.parent.current_export_models_active) 55 | 56 | def _generate_texts(self, validation): 57 | self.export_models_checkbox.setText( 58 | self.tr( 59 | "{verb} the data in a model other than the one where it is stored" 60 | ).format(verb="Validate" if validation else "Export") 61 | ) 62 | self.export_models_checkbox.setToolTip( 63 | self.tr( 64 | """ 65 | 66 |

If your data is in the format of the cantonal model, but you want to {verb} it in the format of the national model.

67 |

The data that cannot be {pastverb} in the selected model is {pastverb} in the model it is stored.

68 |

Usually, this is one single model. However, it is also possible to pass multiple models, which makes sense if there are multiple base models in the schema you want to {verb}.

69 |

This is the value passed to --exportModels

70 | 71 | """ 72 | ).format( 73 | verb="validate" if validation else "export", 74 | pastverb="validated" if validation else "exported", 75 | ) 76 | ) 77 | 78 | def _active_state_changed(self, checked): 79 | self.items_view.setVisible(checked) 80 | if not checked: 81 | # on uncheck disable all 82 | self.items_view.model().check_all([]) 83 | self.parent.current_export_models_active = checked 84 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/help_dialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog 4 | 5 | 6 | 7 | 0 8 | 0 9 | 398 10 | 145 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Help 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 0 30 | 0 31 | 32 | 33 | 34 | <html><head/><body><p>icon</p></body></html> 35 | 36 | 37 | Qt::RichText 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 0 46 | 0 47 | 48 | 49 | 50 | help logline 51 | 52 | 53 | true 54 | 55 | 56 | 57 | 58 | 59 | 60 | Qt::Horizontal 61 | 62 | 63 | 64 | 40 65 | 20 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | <html><head/><body><p>help text</p></body></html> 76 | 77 | 78 | Qt::RichText 79 | 80 | 81 | true 82 | 83 | 84 | 85 | 86 | 87 | 88 | Qt::Horizontal 89 | 90 | 91 | QDialogButtonBox::Close 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | buttonBox 101 | accepted() 102 | Dialog 103 | accept() 104 | 105 | 106 | 248 107 | 254 108 | 109 | 110 | 157 111 | 274 112 | 113 | 114 | 115 | 116 | buttonBox 117 | rejected() 118 | Dialog 119 | reject() 120 | 121 | 122 | 316 123 | 260 124 | 125 | 126 | 286 127 | 274 128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/topping_wizard/models.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Models 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | Qt::Horizontal 21 | 22 | 23 | 24 | 693 25 | 20 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 0 35 | 0 36 | 37 | 38 | 39 | 40 | 75 41 | true 42 | 43 | 44 | 45 | <html><head/><body><p><span style=" font-weight:600;">Select the type for which this topping should be made or specify none (allow all). This value will be written into the categories and the toppings will be filtered accordingly.</span></p></body></html> 46 | 47 | 48 | Select the models for which you want to find this topping in the repositories. 49 | 50 | 51 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 52 | 53 | 54 | true 55 | 56 | 57 | 58 | 59 | 60 | 61 | Refresh 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 0 70 | 0 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | Allow all sources 80 | 81 | 82 | 83 | 84 | PostGIS 85 | 86 | 87 | 88 | 89 | GeoPackage 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | <html><head/><body><p>Select the database type for which you want to find this topping (or specify none to be visible for all).</p></body></html> 101 | 102 | 103 | true 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | SpaceCheckListView 112 | 113 |
QgisModelBaker.utils.gui_utils
114 | 1 115 |
116 |
117 | 118 | 119 |
120 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/workflow_wizard/database_selection.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterlisImport 4 | 5 | 6 | 7 | 0 8 | 0 9 | 799 10 | 265 11 | 12 | 13 | 14 | Select Files 15 | 16 | 17 | 18 | 19 | 20 | 21 | 0 22 | 0 23 | 24 | 25 | 26 | 27 | 75 28 | true 29 | 30 | 31 | 32 | Select the database you want to use 33 | 34 | 35 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 36 | 37 | 38 | true 39 | 40 | 41 | 42 | 43 | 44 | 45 | true 46 | 47 | 48 | 49 | 50 | 0 51 | 0 52 | 779 53 | 222 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 0 62 | 0 63 | 64 | 65 | 66 | 67 | 88 68 | 16777215 69 | 70 | 71 | 72 | Source 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | INTERLIS (PostGIS) 81 | 82 | 83 | 84 | 85 | INTERLIS (GeoPackage) 86 | 87 | 88 | 89 | 90 | PostGIS 91 | 92 | 93 | 94 | 95 | GeoPackage 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | Qt::Vertical 112 | 113 | 114 | 115 | 20 116 | 462 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /QgisModelBaker/ui/dataset_manager.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DatasetManager 4 | 5 | 6 | 7 | 0 8 | 0 9 | 855 10 | 288 11 | 12 | 13 | 14 | Dataset Manager 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | true 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Qt::Horizontal 42 | 43 | 44 | 45 | 40 46 | 20 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Create a dataset 55 | 56 | 57 | Create Dataset 58 | 59 | 60 | 61 | 62 | 63 | 64 | <html><head/><body><p>To create a <span style=" font-weight:600;">basket</span> per <span style=" font-weight:600;">topic</span> and <span style=" font-weight:600;">dataset </span>in the <span style=" font-style:italic;">t_ili2db_basket</span> table or not.</p><p>While a dataset is just an entry in the <span style=" font-style:italic;">t_ili2db_dataset</span> table, there must be baskets for each entry that can be selected. Usually there exists only one basket per topic and dataset.</p></body></html> 65 | 66 | 67 | Manage baskets of selected dataset 68 | 69 | 70 | 71 | 72 | 73 | 74 | Edit the selected dataset name 75 | 76 | 77 | Rename Dataset 78 | 79 | 80 | 81 | 82 | 83 | 84 | Delete the selected dataset 85 | 86 | 87 | Delete Dataset 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | QDialogButtonBox::Ok 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | --------------------------------------------------------------------------------