Releases: opengisch/QgisModelBaker
7.2.6
7.2.5
7.2.4
7.2.3
Fixes
- Validator: Only pan when feature has geometry
- Validator: Flash coordinates and feature geometry if available
- Validator: Zoom to feature if feature is found and otherwise to the coordinates with automatic zoom
- Validator: Show object tag (classname) in tooltip
- Validator: When finding the feature according the t_ili_tid, only consider the ones in the schema that is validated
- Validator: Info that diableAreaValidation is set on skip geometry error (Fix in modelbaker library with release 1.3.3.)
Library
Using modelbaker library 1.3.3
7.2.2
7.2.1
Fixes
- Check layer before reading
dataSource
. Avoids trouble with invalid layers on UsabILIty Hub Topping Exporter. Fixes #726 - Improved column naming, tool tips and description on layer page of UsabILIty Hub Topping Exporter.
- Logic on UsabILIty Hub Topping Exporter layer page that when definition is selected, the style and source get deselected (and the other way around) See movie below.
- Locic on UsabILIty Hub Topping Exporter layer page that when a parent has the definition selected the children get deselected (and the other way around) See movie below.
- Make the wizard dialog expandable and shrinkable. Fixes #725
- Not reinit (and starting timer) when canceling the Dataset Manager. Fixes #695
Library
Using modelbaker library 1.3.1
7.2.0
This release brings some improvements on the data validator like passing additional parameters like the config-file. As well this version introduces the UsabILIty Hub Topping Exporter what makes finally the UsabILIty Hub usable for any user without big technical skills.
UsabILIty Hub Topping Exporter
A new wizard provides the functionality to export the current project to UsabILIty Hub topping.
Folder Structure and Metainfo
You can add the information like owner, dates etc. (needed in the ilidata.xtf) on the first page of the wizard.
As well the folder structure can be defined.
Model Selection
Even when having multiple INTERLIS models imported in the same database schema, you can select the ones of interest (and this will be the one that is entered in ilidata.xml to find the topping for it).
Layer Export Settings
The layer tree structure (with the info if the layer/group is expanded and feature count etc.) is taken from the current project setting.
The information if QML style should be provided (and with it what categories) or a QLR definition or just the source of a layer can be chosen on this page.
Reference Data
The reference data to be linked (like catalogue data files) can be chosen over the file browser from the local machine or over the online repositories to add just the link to a public file.
ili2db Settings
You can choose from what database schema the ili2db settings should be parsed. Only the parameters used by the Model Baker are currently parsed, since all others cannot be used anyway yet (because ili2db does not yet support the passing of the metaconfiguration file).
This settings cannot be changed (maybe in future). But you can append a local Extra Model Information Files (TOML/INI) and SQL-scripts.
Generation of ilidata.xml
A local ilidata.xml is created indexing all the files.
Library Backend
The backend of the exporter is part of the modelbaker backend library in the sub-package ilitoppingmaker
.
This is a small example how to interact with it:
import os
import tempfile
from qgis.core import QgsProject
import modelbaker.utils.db_utils as db_utils
from modelbaker.ilitoppingmaker import (
ExportSettings,
IliData,
IliProjectTopping,
IliTarget,
MetaConfig,
)
from modelbaker.iliwrapper.globals import DbIliMode
from modelbaker.iliwrapper.ili2dbconfig import Ili2DbCommandConfiguration
# prepare target
basetestpath = tempfile.mkdtemp()
testdatapath = "/home/freddy/tests/testdata"
maindir = os.path.join(basetestpath, "freddys_repository")
subdir = "freddys_projects/this_specific_project"
target = IliTarget(
"freddys",
maindir,
subdir,
None,
"mailto:freddy",
"27-09-2022",
"27-09-2022",
)
# prepare metaconfig
metaconfig = MetaConfig()
configuration = Ili2DbCommandConfiguration()
configuration.dbfile = "/home/freddy/tests/testdata/data.gpkg"
configuration.tool = DbIliMode.ili2gpkg
db_connector = db_utils.get_db_connector(configuration)
if db_connector:
metaconfig.ili2db_settings.parse_parameters_from_db(db_connector)
metaconfig.ili2db_settings.metaattr_path = os.path.join(testdatapath, "toml/KbS_V1_5.toml")
metaconfig.ili2db_settings.prescript_path = ""
metaconfig.ili2db_settings.postscript_path = (
"ilidata:postscript_from_another_repo"
)
# prepare exportsettings
export_settings = ExportSettings()
export_settings.set_setting_values(
ExportSettings.ToppingType.QMLSTYLE, None, "Layer One", True
)
export_settings.set_setting_values(
ExportSettings.ToppingType.DEFINITION, None, "Layer Three", True
)
export_settings.set_setting_values(
ExportSettings.ToppingType.SOURCE, None, "Belasteter_Standort", True
)
# now do the automatic way
topping = IliProjectTopping(target, export_settings, metaconfig)
ilidata_path = topping.makeit(QgsProject.instance())
print(f"Exported ilidata to {ilidata_path}")
The ilitoppingmaker
extends another public package called toppingmaker
that can be used for non-INTERLIS purposes as well.
Sponsors
This feature has been financed by a friendly collaboration of the cantons Schaffhausen, Appenzell Innerhoden and Schwyz
Validator Improvements
The Data Validator received some additional functionality.
Exclude the GeometryCheck from validation
In case you want first fix all the other checks before you care about the geometry errors, you can simply turn it off. This implements the parameter --skipGeometryErrors
.
Pass a validation config file to control other checks
With a validation config file (INI) you can pass some other parameters to ili2db like e.g.:
- deactivates mandatory constraints:
multiplicity="off"
- deactivates reference constraint:
target="off"
- deactivates type constraints:
type="off"
- deactivates logical constraints:
constraintValidation="off"
See full documentation here https://github.com/claeis/ilivalidator/blob/master/docs/ilivalidator.rst#konfiguration
Copy text for further use and nice features to zoom and pan
By right-click it's possible to get the error message for further use.
With the buttons on bottom right, you can use the "zoom" and "pan" functionality, like you are used to it from the QGIS Attribute Table.
Sponsors
This feature has been financed by Metron Raumentwicklung AG
Fixes
- Beware order of fields from PostgreSQL opengisch/QgisModelBakerLibrary#25 (sponsored by Kanton Schaffhausen)
- Only use linking relation editor on relations not targeting geometry layers opengisch/QgisModelBakerLibrary#19
- Check if source is not none before checking if it's valid #716
ili2db
Using ili2db version 4.9.0
Library
Using modelbaker library 1.3.0