QgisModelBaker Versions Save

Create QGIS projects from database schemas or Interlis models

v7.2.4

1 year ago

Fixes

Library

Using modelbaker library 1.3.4

v7.2.3

1 year ago

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

v7.2.2

1 year ago

Fixes

  • Don't handle new style categories when QGIS lower 3.20
  • Handle invalid db_connectors. Fixes https://github.com/opengisch/QgisModelBaker/issues/731
  • Pan and zoom improvements in the Model Baker Validator and display error count
  • Finetune validator GUI - remove margins etc.

Library

Using modelbaker library 1.3.2

v7.2.1

1 year ago

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

v7.2.0

1 year ago

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. image

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.

image

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). image

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.

image

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.

image

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).

image

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.

image

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.:

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. output

Sponsors

This feature has been financed by Metron Raumentwicklung AG

Fixes

ili2db

Using ili2db version 4.9.0

Library

Using modelbaker library 1.3.0

Known Issues

#722

v7.1.9

1 year ago

Fixes

  • Fix check of data source on none layers
  • Load UsabILIty Hub layertree defined layers without having an alias properly #701

Library

Using modelbaker library 1.2.5

v7.1.8

1 year ago

Fixes

  • Support combination of PostgreSQL service-conf parameters and manual settings (with QGIS Authentification Configuration)
  • Disable LV03 models when LV95
  • Change Button to "Run without validation" on failing import/export

Library

Using modelbaker library 1.2.4

v7.1.7

1 year ago

Fixes

  • Use --exportTid in data validation
  • Fill up optional t_ili_tid columns with UUID default values

Library

Using modelbaker library 1.2.0

v7.1.6

2 years ago

Fixes

  • Fix problem on Python 3.10 when passing enum roles not as int
  • In the Dataset Selector: Store default values of baskets per model and topic (and not per schema anymore, since it leaded to trouble when exchanging QML style configurations e.g. by UsabILIty Hub)
  • In the Dataset Selector: Fill up the project variables to have stable default value on tables based on structure etc. with the first selection of a layer (we use the first available basket).

Library

Using modelbaker library 1.1.2

v7.1.5

2 years ago

Fixes

  • ITF Model parser