Modelbaker

Latest version: v1.9.3

Safety actively analyzes 682471 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 31

7.7.0

Main feature of this release is all about OIDs, a pain point that has existed for quite some time. First thing is the OIDs generated for the single objects, means the TID (or t_ili_tid in the physical database) what is done with default value expressions. The second thing is the OIDs generated for basket-objects, means the BID (and as well t_ili_tid in the physical database), when creating baskets, what now can be controlled by the user as well.

Improvements

TID (OID) Generation for Objects
Often the models definition requires a cross-system unique identificator. The so called OID.

Model Baker detects the OID domain (like `UUIDOID`, `I32OID`, `STANDARDOID`, `ANYOID` or user defined OID) and suggests default value expressions used in the `t_ili_tid` fields.

Since the user have to be able to edit those values, they are provided in the GUI.

See [documentation](https://opengisch.github.io/QgisModelBaker/background_info/oid_tid_generator/)

In the wizard
There is an additional page after the generation of the QGIS project.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/9a4beb61-ebfa-43fe-beab-5e9ebb1c333d)

You can use the QGIS Expression Dialog to edit the default value expression for the `t_ili_tid` field of each layer.

See [documentation](https://opengisch.github.io/QgisModelBaker/user_guide/import_workflow/#tid-oid-values)

On existing projects

Find the **TID (OID) Manager** via the *Database > Model Baker* menu.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/fc7902b8-1f4f-4cef-96be-e7b8115821ae)

If you need a counter in the expressions, you can use the `t_id` field, that has a schema-wide sequence counting up. This sequence can be reset as well by the user, but be carefull not to set it lower than already existing `t_id`s in your project.

Sponsors
This feature has been financed in a crowdfunding project by [geostandards.ch](https://geostandards.ch/), [Canton of Schaffhausen](https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Volkswirtschaftsdepartement/Amt-f-r-Geoinformation-3854-DE.html) and the QGIS Model Baker Group

Basket Generation with BID (OID)

In case you create a new dataset (e.g. the `Baseset` that is created by Model Baker automatically) and you want to collect ***fresh*** data in QGIS (no import of existing data), the baskets have to be created as well.

Here the `BID` definition needs to be considered.

In the wizard

There is an additional page after the schema import when the `Baseset` is created.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/8a68d207-a4ee-431e-b764-2abd9c1b5f3c)

Reasonable BIDs are suggested, but of course some of them (like `STANDARDOID`) need editing by the user.

As well Model Baker suggests what baskets should be created or not (it sees it as relevant in case it's not extended by other topics).

See [documentation](https://opengisch.github.io/QgisModelBaker/user_guide/import_workflow/#create-baskets)

In the Dataset Manager

Of course you might want to create additional Datasets and with it the Baskets. Here is a new option *Manage baskets of selected dataset* to create the baskets you want.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/e0534984-4d0d-4054-a8ab-7e6c734200b8)

See [documentation](https://opengisch.github.io/QgisModelBaker/background_info/basket_handling/#creation-of-baskets)

Sponsors
This feature has been financed in a crowdfunding project by [geostandards.ch](https://geostandards.ch/), [Canton of Schaffhausen](https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Volkswirtschaftsdepartement/Amt-f-r-Geoinformation-3854-DE.html) and the QGIS Model Baker Group

Schema section in drop down
On PostgreSQL connections you are now able to select your schema.

![Screenshot from 2023-11-24 13-12-40](https://github.com/opengisch/QgisModelBaker/assets/28384354/5fa3e3f8-2525-4da8-a71e-a9b47fc9faf8)

Sponsors
This feature has been financed by the [Canton of Schaffhausen](https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Volkswirtschaftsdepartement/Amt-f-r-Geoinformation-3854-DE.html)

ili2db

7.6.1

Improvements / Fixes

Filter in Relation Reference for Baskets
On extended class's layers all possible baskets (if NONE-Strategy) or only the relevant ones (if GROUP- or HIDE-Strategy) are listed in the widget of the `t_basket` field.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/afacceaa-d392-4d36-bb46-94b9150dd07d)

Dataset Selector and Default Values
In the dataset selector all possible baskets (if NONE-Strategy) or only the relevant ones (if GROUP- or HIDE-Strategy) are listed. The chosen value is then written to the project variable and can be used as default value.

Library
Using modelbaker library [1.5.1](https://github.com/opengisch/QgisModelBakerLibrary/releases/tag/v1.5.1)

7.6.0

This release offers new features that make working with advanced capabilities of INTERLIS even more enjoyable, such as with **advanced models** and using **validation configurations**. Furthermore, it offers some enhancements and fixes, like **clearing the cache**, a pleasant **log** and the support of drag'n'drop of **extra meta attribute files**.

Improvements
Optimized Project Generation of extended INTERLIS Models

The problem
If a model or topic contains extended classes, the inclusive base classes are implemented in the physical database what leaded to a confusing layer tree, messy forms and lots of unused relations.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/c4374c22-fe86-4013-88a3-598d551ad312)

While the you only want to see, what is relevant for you, Model Baker detects the ***irrelevant*** layers and lets you to apply an optimization to the project.

The solution
When generating a project you can now choose one of the following strategies to optimize your project:
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/f0655dd2-998a-4884-b49d-e0800e41c8bb)

Hide strategy
Base class layers with extensions of the same name are **_hidden_** and base class layers with multiple extensions **_also_**. Unless the extension is in the same model, then it's _**not hidden**_ but renamed.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/533392a0-6277-4e8a-ad7d-57a58b96576d)
Relations of hidden layers are **_not created_** and thus the widgets for them _**neither**_.

Group strategy

Base class layers with extensions of the same name are ***grouped***, base class layers with multiple extensions ***also***. Unless the extension is in the same model, then it's ***not grouped*** but ***renamed***.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/3a655661-c436-42de-8d42-c11e51743ed9)

Relationships of grouped layers are ***created***, but widgets are ***not applied*** to the form.

None strategy
Independently from extended models (but pretty much connected to it), we eliminate ambiguous layer naming in general. This means:
- If layername is ambiuous append topic name as suffix.
- If layername is still ambiguous append model name as suffix.

![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/23d7031c-50bf-4df7-8a01-b4e304073372)

Sponsors
This feature has been financed by [QGIS Anwendergruppe Schweiz - Groupe d'utilisateurs QGIS Suisse - Swiss QGIS User Group](https://qgis.ch)

Persistent Logging Functionality
Warning and information messages are printed to the log panel of the wizard dialog. This is good to see the information immediately, but to track down a problem, users and developers require the information of past actions. The new logging functionality saves each log output to a daily file (in the plugin directory, i.e. the QGIS profile folder) and keeps the last ten files accessible via the Model Baker menu.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/0d68786f-2d21-4acd-a083-a89ea9c98f76)

Error dialog
If Java is not installed, a barely visible log line used to be output. For people using Model Baker (and thus ili2db) for the first time, this was quite confusing. Now a popup appears indicating that Java is not installed and pointing to a possible [download source](https://adoptium.net/download/).

Clear Ilicache Button
In several places, but especially on the Source Selection Page, the user can select and use a model from the network of [Swiss Geodata Repositories](https://opengisch.github.io/QgisModelBaker/background_info/repositories/). These files are downloaded and cached locally. In case of immediate changes - which is not often the case, but can be if the model is in a test phase - the problem can occur that a different file (the one from the cache instead of the one from the repository) is used. Users had to delete the cache folder manually, which was usually too advanced and inconvenient. This is now solved by having a button do it for you.
![clearcache](https://github.com/opengisch/QgisModelBaker/assets/28384354/3584b318-460d-4b2c-84d5-10eae30665d5)

Store Validator Config File in Project Variable
Since some time you have the possibility to select a [config file](https://opengisch.github.io/QgisModelBaker/user_guide/validation/#using-of-meta-attributes-in-the-validation) in the validator and pass it to ili2db. Since it is meaningful to use this multiple times, it is handy that you can now store the path in the QGIS project variables. The path is stored relatively (so that the project can be exchanged to other systems), but passed absolutely to ili2db. Likewise, it is possible to pass (and store) a key to the ilidata repository, like `ilidata:<key>`.
![image](https://github.com/opengisch/QgisModelBaker/assets/28384354/039f5fef-165c-4feb-8a53-830d6529195b)

Drag&Drop Support for Extra Meta Attribute Files (toml/ini)
While Model Baker claims to do everything for you when dragging and dropping files into QGIS, the Extra Meta Attribute Files (the file formerly known as the toml file) were not considered. This is now fixed. When you drop an additional Extra Meta Attribute File, it is automatically set in the advanced schema import settings.

Other Improvements and Fixes
* Possibility to validate schemas based on ili2db 3.x.x
* Fix missing port parsing from layer to use in validator
* COMPOSITION strength relation on STRUCTURE childs: A `STRUCTURE` object cannot exist without a parent. This means when the parent is deleted the entry in the linking table (the structure) needs to be deleted. Means, every relation with a child that is a structure, shall have composition as strength.
* Better default size for Layer Style Categories Dialog
* Add the icon for the main menu entry
* Remove old unused files

ili2db
Using ili2db version 5.0.0 fixing this https://github.com/opengisch/QgisModelBaker/issues/779

Library
Using modelbaker library [1.5.0](https://github.com/opengisch/QgisModelBakerLibrary/releases/tag/v1.5.0)

7.5.2

Fixes
* Sort models / toppings in autocompleter box
* Print short description when a metaconfig has been selected
* Set current layer only if validate dock is visible
* Deactivate next button while searching for referenceData

Library
Using modelbaker library [1.4.4](https://github.com/opengisch/QgisModelBakerLibrary/releases/tag/v1.4.4)

7.5.1

Fixes
* Fix multiple evaluation of next-id in wizard and broken export models check-list and broken export models GUI on validator.

Library
Using modelbaker library [1.4.3](https://github.com/opengisch/QgisModelBakerLibrary/releases/tag/v1.4.3)

7.5.0

This release brings better support of working with extended models concerning **export** and **validation**.

Improvements
Export the data in the base model format

If your data is in the format of the cantonal model, but you want to export it in the format of the national model, you have to pass `--exportModels` to ili2db, otherwise (or if the data cannot be exported/validated in the selected model because it's not an extension of it) the data is exported in the model it is stored.

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.

![image](https://user-images.githubusercontent.com/28384354/230720385-0c8882f5-6308-4355-9bc3-ce13d66ac967.png)

Note that this implementation works as addition (and not replacement) of the filters where models can be passed to define what data (not what format) should be exported.

The tool tip is listing all the relevant parent models (the ones that are listed as well, means are exportable).

The export session visualization has been improved, helping for more clearity.
![image](https://user-images.githubusercontent.com/28384354/230720404-e7c12c99-2bd8-435a-948c-33125fdd4b65.png)

Validate the data in the base model format

Same is now supported in the validator as well.

When the data are validated in the model where they are stored (here `Staedtischer_Ortsplanung_V1_1` extending `Kantonale_Ortsplanung_V1_1`, all the constraints are considered. Means the one of the extended model and of its parents.

![image](https://user-images.githubusercontent.com/28384354/230720664-58b532a5-08aa-4380-b2a8-6262b543d735.png)

And when validating according to the parent model, only the parent model's constraints are checked (and the parent's parent's constraints of course :smile:
![image](https://user-images.githubusercontent.com/28384354/230720724-2d082f11-620a-4ac5-918b-86c53dcbe387.png)

Sponsors
This feature has been financed by [QGIS Anwendergruppe Schweiz - Groupe d'utilisateurs QGIS Suisse - Swiss QGIS User Group](https://qgis.ch)

ili2db

Page 3 of 31

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.