{"id":13328,"date":"2022-11-15T06:47:00","date_gmt":"2022-11-15T05:47:00","guid":{"rendered":"https:\/\/www.opengis.ch\/?p=13328"},"modified":"2024-08-13T23:37:51","modified_gmt":"2024-08-13T21:37:51","slug":"model-baker-interlis-data-validator","status":"publish","type":"post","link":"https:\/\/www.opengis.ch\/it\/2022\/11\/15\/model-baker-interlis-data-validator\/","title":{"rendered":"Model Baker INTERLIS Data Validator"},"content":{"rendered":"\n<p><strong>The fully integrated Data Validator, which allows validating your<\/strong> <strong>data directly in QGIS against their INTERLIS model, exists for almost a year now. After lots of user feedback and some investments, it&#8217;s now shinier than ever. Time for an update and a little step-by-step guide.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why is it so awesome?<\/h2>\n\n\n\n<p>Using the Model Baker Data Validator has two major advantages.<\/p>\n\n\n\n<p>First, <strong>you do not need to export your data before you validate them<\/strong>. Thanks to the&nbsp;<code>--validate<\/code>&nbsp;option, Model Baker can use&nbsp;<a href=\"https:\/\/github.com\/claeis\/ili2db\">ili2db<\/a>&nbsp;to validate the data directly in the database.<\/p>\n\n\n\n<p>Second, you can interactively use the result list and <strong>zoom or pan to coordinates of validation issues<\/strong> in the QGIS map canvas or directly <strong>open or select the feature in question<\/strong>. So fixing the errors is much easier.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"149\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/menu.png?resize=750%2C149&#038;ssl=1\" alt=\"\" class=\"wp-image-13329\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/menu.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/menu.png?resize=300%2C59&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/menu.png?resize=768%2C152&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/menu.png?resize=469%2C93&amp;ssl=1 469w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-by-step-guide\">Step-by-step guide<\/h2>\n\n\n\n<p>Though the validation is performed on the database, we start with importing an invalid transfer file. With this, we have the complete end-to-end journey ?\u200d?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"import-invalid-data\">Import invalid data<\/h3>\n\n\n\n<p>Depending on the quality of your data, you need to create the schema already with less strict constraints in the database. Like if some mandatory (NOT NULL) constraints are violated in your data, you need create a database without these constraints enabled.<\/p>\n\n\n\n<p>We use an <a href=\"https:\/\/models.opengis.ch\/demo_data\/ModernCity_V1.ili\">example model<\/a>&nbsp;in this guide to avoid complexity and some <a href=\"https:\/\/models.opengis.ch\/demo_data\/invalid_data.xtf\">invalid demo data<\/a>. <\/p>\n\n\n\n<p>In&nbsp;<em>Database &gt; Model Baker &gt; Import\/Export Wizard<\/em>&nbsp;choose <em>Run without constraints<\/em> on the import session. <\/p>\n\n\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"63\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/runwithoutconstraints.png?resize=750%2C63&#038;ssl=1\" alt=\"\" class=\"wp-image-13330\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/runwithoutconstraints.png?w=784&amp;ssl=1 784w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/runwithoutconstraints.png?resize=300%2C25&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/runwithoutconstraints.png?resize=768%2C65&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/runwithoutconstraints.png?resize=469%2C39&amp;ssl=1 469w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>And when importing the transfer data choose <em>Run without validation<\/em>.<\/p>\n\n\n\n<p>The database is created and the invalid data from the transfer file are imported. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"363\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?resize=750%2C363&#038;ssl=1\" alt=\"\" class=\"wp-image-13331\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?resize=1024%2C496&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?resize=300%2C145&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?resize=768%2C372&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?resize=469%2C227&amp;ssl=1 469w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?resize=1536%2C744&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/importedproject.png?w=1963&amp;ssl=1 1963w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>More information how to import models and transfer files in general you can find in the\u00a0<a href=\"https:\/\/opengisch.github.io\/QgisModelBaker\/user_guide\/import_workflow\/\">official Model Baker documentation<\/a>\u00a0or in this\u00a0<a href=\"https:\/\/www.opengis.ch\/de\/2021\/12\/07\/model-baker-6-7-noch-nie-wars-so-einfach\/\">blog post.<\/a><\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"validate\">Let&#8217;s validate<\/h3>\n\n\n\n<p>Now open the Data Validator panel with&nbsp;<em>Database &gt; Model Baker &gt; Data Validator<\/em>.<\/p>\n\n\n\n<p>There the current database is found according to the active layer. In our example, we have only one database, but if you use more than one in the same QGIS project, the Data Validator will recognize the source of the current layer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/1.png?resize=750%2C450&#038;ssl=1\" alt=\"\" class=\"wp-image-13341\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/1.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/1.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/1.png?resize=768%2C461&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/1.png?resize=440%2C264&amp;ssl=1 440w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>After performing the validation we receive 14 errors. Geometry intersections, wrong formatted TIDs, out-of-range values and others. Actually, these are not many errors, still, sometimes you might want to separate the kind of errors that are found to keep the overview.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"filtering-data\">Filtering data<\/h3>\n\n\n\n<p>Let&#8217;s start with the separation of the data and later we separate the kinds of errors. You can do it by filtering the data either by <em>models<\/em> or <em>datasets<\/em> or <em>baskets<\/em>. You can choose multiple of them, but only one kind of filter. Let&#8217;s validate only the data of the basket considering the TOPIC <code>nature<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/2.png?resize=750%2C450&#038;ssl=1\" alt=\"\" class=\"wp-image-13342\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/2.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/2.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/2.png?resize=768%2C461&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/2.png?resize=440%2C264&amp;ssl=1 440w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>We have three intersection issues and one type error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"skip-geometry-errors\">Skip geometry errors<\/h3>\n\n\n\n<p>When the checkbox is activated, geometry errors are ignored and the validation of area topology is disabled. Errors like those will not be listed:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Intersecting geometries<\/li>\n\n\n\n<li>Duplicate coordinates<\/li>\n\n\n\n<li>Overlaying geometries<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>In the back end the parameters\u00a0<code>--skipGeometryErrors<\/code>\u00a0and\u00a0<code>--disableAreaValidation<\/code>\u00a0are passed to ili2db.<\/p>\n<\/blockquote>\n\n\n\n<p>After performing the validation only the error with the TID is left.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/3.png?resize=750%2C450&#038;ssl=1\" alt=\"\" class=\"wp-image-13343\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/3.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/3.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/3.png?resize=768%2C461&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/3.png?resize=440%2C264&amp;ssl=1 440w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"analyse-the-error\">Analise the error<\/h3>\n\n\n\n<p>Before we go narrowing down the error message by disabling constraints, let&#8217;s have a look at the fixing part. The error we see above tells us the TID needs to be a UUID but it is a string: &#8220;velopark_id&#8221;<\/p>\n\n\n\n<p>The TID is the OID defined in the model like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OID AS INTERLIS.UUIDOID;<\/code><\/pre>\n\n\n\n<p>In the physical model, it&#8217;s represented by the column called&nbsp;<code>t_ili_tid<\/code>.<\/p>\n\n\n\n<p>With&nbsp;<em>right-click<\/em>&nbsp;in the Data Validator on the error a menu is opened with the following options:<\/p>\n\n\n\n<p>&#8211; Zoom to coordinates (if coordinates are provided) with an extent of 10 map units<br>&#8211; Open in Feature Form (if a stable <code>t_ili_tid<\/code> is available)<br>&#8211; Select in Attribute Table (if a stable <code>t_ili_tid<\/code> is available)<br>&#8211; Set to fixed (marking the entry mark green to have organize the fixing process)<br>&#8211; Copy (to copy the message text)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/4.png?resize=750%2C450&#038;ssl=1\" alt=\"\" class=\"wp-image-13344\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/4.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/4.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/4.png?resize=768%2C461&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/4.png?resize=440%2C264&amp;ssl=1 440w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>On opening the form, we see that we don&#8217;t have any possibility of changing the t_ili_tid. Since it&#8217;s an auto-generated value, Model Baker did not set it to the visible fields on creating the form. We would need to display it by clicking on the&nbsp;<em>Layer &gt; Properties&#8230; &gt; Attribute Form<\/em>&nbsp;or we use the other option to <em>Select in Attribute Table<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"450\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/5.png?resize=750%2C450&#038;ssl=1\" alt=\"\" class=\"wp-image-13345\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/5.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/5.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/5.png?resize=768%2C461&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/5.png?resize=440%2C264&amp;ssl=1 440w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>Now we can use the QGIS Field Calculator to set a UUID on the&nbsp;<code>t_ili_tid<\/code>&nbsp;of the currently selected feature (the feature in question).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"490\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/6.png?resize=750%2C490&#038;ssl=1\" alt=\"\" class=\"wp-image-13346\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/6.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/6.png?resize=300%2C196&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/6.png?resize=768%2C501&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/6.png?resize=404%2C264&amp;ssl=1 404w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>After validating again, the error disappears.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"449\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/7.png?resize=750%2C449&#038;ssl=1\" alt=\"\" class=\"wp-image-13347\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/7.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/7.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/7.png?resize=768%2C460&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/7.png?resize=441%2C264&amp;ssl=1 441w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>Valid. But of course, there are still the geometry errors as well as all the errors we had in the other TOPIC <code>living<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Fixing geometry errors<\/h3>\n\n\n\n<p>Let&#8217;s have a look at the geometry errors. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"449\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/8.png?resize=750%2C449&#038;ssl=1\" alt=\"\" class=\"wp-image-13348\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/8.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/8.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/8.png?resize=768%2C460&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/8.png?resize=441%2C264&amp;ssl=1 441w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption class=\"wp-element-caption\">With <em>right-click<\/em> &gt; Zoom to Coordinates the canvas zoom to the coordinates in question and highlights them. <\/figcaption><\/figure>\n\n\n\n<p>To fix intersections as well as duplicate errors, the QGIS <em>Vertex Tool<\/em> can be used. <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"44\" height=\"34\" class=\"wp-image-13359\" style=\"width: 44px;\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-08-14-14-56.png?resize=44%2C34&#038;ssl=1\" alt=\"\">As well the <em>Vertex Editor<\/em> is very helpful.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"449\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-14-02.png?resize=750%2C449&#038;ssl=1\" alt=\"\" class=\"wp-image-13349\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-14-02.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-14-02.png?resize=300%2C180&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-14-02.png?resize=768%2C460&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-14-02.png?resize=441%2C264&amp;ssl=1 441w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Navigating through the errors<\/h3>\n\n\n\n<p>With the three symbols on the bottom left you can navigate through the features and coordinates in the error list, like you are used to it in the attribute table. <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"112\" height=\"30\" class=\"wp-image-13361\" style=\"width: 112px;\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/grafik.png?resize=112%2C30&#038;ssl=1\" alt=\"\"><\/p>\n\n\n\n<p>Most of the errors concerning a value can be fixed comfortably by the tools provided with<em> right-click<\/em> <em>&gt; Open in Feature Form \/ Select in Attribute Table<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-config-file-with-meta-attributes\">Using Config File with meta attributes<\/h3>\n\n\n\n<p>The possibility to skip the error messages is quite present. But there are much more possibilities to narrow down the errors by skipping more specific checks. <\/p>\n\n\n\n<p>To have all the validation functionalities available you can load a Config File (INI) the Data Validator passes to ili2db. In this Config File, meta attributes can be defined to enable \/ disable specific checks as well as naming and describe constraints in a more readable format. The basics are described&nbsp;<a href=\"https:\/\/opengisch.github.io\/QgisModelBaker\/user_guide\/validation\/#using-of-meta-attributes-in-the-validation\">here<\/a>. Let&#8217;s continue in this post with the example.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"446\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-41-33.png?resize=750%2C446&#038;ssl=1\" alt=\"\" class=\"wp-image-13351\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-41-33.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-41-33.png?resize=300%2C179&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-41-33.png?resize=768%2C457&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-41-33.png?resize=444%2C264&amp;ssl=1 444w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Global parameters<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\"PARAMETER\"]\nmultiplicity=\"off\"\nconstraintValidation=\"off\"<\/code><\/pre>\n\n\n\n<p>By disabling the <code>multiplicity<\/code> we disable mandatory constraints and cardinality checks on associations. By disabling <code>constraintValidation<\/code> all the defined logical constraints are not considered.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>See all the possible meta attributes in the official <a href=\"https:\/\/github.com\/claeis\/ilivalidator\/blob\/master\/docs\/ilivalidator.rst#interlis-metaattribute\">documentation of ilivalidator<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<h4 class=\"wp-block-heading\">Specific class \/ attribute parameters<\/h4>\n\n\n\n<p>The errors that are left are type errors. A value in <code>Levels<\/code> that is too high (see in the Model: <code>Levels: 0 .. 200;<\/code>) then the error with control characters (mostly because of using multiple lines in normal <code>TEXT<\/code>) in the attribute <code>Description<\/code> and the values in <code>Email<\/code> that are not in the requested <code>INTERLIS.URI <\/code>format.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"237\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-53-36.png?resize=750%2C237&#038;ssl=1\" alt=\"\" class=\"wp-image-13353\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-53-36.png?w=971&amp;ssl=1 971w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-53-36.png?resize=300%2C95&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-53-36.png?resize=768%2C243&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-07-17-53-36.png?resize=469%2C148&amp;ssl=1 469w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>We can disable them by referencing the attribute in question with the format <code>Model.Topic.Attribute<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\"ModernCity_V1.Living.Building.Levels\"]\ntype=\"off\"\n&#91;\"ModernCity_V1.Living.Building.Description\"]\ntype=\"off\"\n&#91;\"ModernCity_V1.Living.Resident.Email\"]\ntype=\"off\"<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>See for all the global configurations the official <a href=\"https:\/\/github.com\/claeis\/ilivalidator\/blob\/master\/docs\/ilivalidator.rst#ini-globale-konfigurationen\">documentation of ilivalidator<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<h4 class=\"wp-block-heading\">Add constraint description and name with meta attributes<\/h4>\n\n\n\n<p>Finally, let&#8217;s take a look at something particularly beautiful. <\/p>\n\n\n\n<p>This constraint here in the model is a logical constraint. It&#8217;s neither implemented in the physical database nor the validator can recognize what it means:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          Name: TEXT;\n          IsHuman: BOOLEAN;\n          SET CONSTRAINT WHERE IsHuman:\n            DEFINED(Name);<\/code><\/pre>\n\n\n\n<p>It means that if the boolean value <code>IsHuman<\/code> is true, <code>Name<\/code> must not be NULL. Anyway, the validator output would be like this:<\/p>\n\n\n\n<p><code>Set Constraint ModernCity_V1.Living.Resident.Constraint1 is not true.<\/code><\/p>\n\n\n\n<p>Because we had in our example already a meta attribute defined, but in the model itself. It did not say Constraint1, but:<\/p>\n\n\n\n<p><code>Set Constraint ModernCity_V1.Living.Resident.MandatoryHumanName is not true.<\/code><\/p>\n\n\n\n<p>The definition in the model looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>      !!@ name = MandatoryHumanName\n      SET CONSTRAINT WHERE IsHuman:\n        DEFINED(Name);<\/code><\/pre>\n\n\n\n<p>To define a better readable message you can use <code>!!@ ilivalid.msg<\/code> to define the complete error message as well.<\/p>\n\n\n\n<p>But because normally the person doing the data validation is not the same as the person writing the model, these meta attributes are not in the model. So everyone can define his messages in the Config File, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\"ModernCity_V1.Living.Resident.Constraint1\"]\nmsg = \"When the resident with the id {ID} is human, then it needs a name.\"<\/code><\/pre>\n\n\n\n<p>Notices that you can use other attribute values with curly brackets.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"99\" src=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-08-13-54-17-1.png?resize=647%2C99&#038;ssl=1\" alt=\"\" class=\"wp-image-13356\" srcset=\"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-08-13-54-17-1.png?w=647&amp;ssl=1 647w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-08-13-54-17-1.png?resize=300%2C46&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/Screenshot-from-2022-11-08-13-54-17-1.png?resize=469%2C72&amp;ssl=1 469w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Well then, that&#8217;s it<\/h2>\n\n\n\n<p>For more information, check out the <a href=\"https:\/\/opengisch.github.io\/QgisModelBaker\/\" data-type=\"URL\" data-id=\"https:\/\/opengisch.github.io\/QgisModelBaker\/\">Model Baker documentation.<\/a><\/p>\n\n\n\n<p>Meanwhile happy baking and: Happy validating! ?\u200d?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The fully integrated Data Validator, which allows validating your data directly in QGIS against their INTERLIS model, exists for almost a year now. After lots of user feedback and some investments, it&#8217;s now shinier than ever. Time for an update and a little step-by-step guide. Why is it so awesome? [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":13348,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,7,15,16,161],"tags":[196,192,194],"class_list":["post-13328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gis","category-interlis","category-qgis","category-qgis-plugins","category-uncategorised","tag-ilivalidator","tag-interlis-2","tag-model-baker-2"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/8.png?fit=971%2C581&ssl=1","jetpack-related-posts":[{"id":15040,"url":"https:\/\/www.opengis.ch\/de\/2023\/03\/06\/qgis-model-baker\/","url_meta":{"origin":13328,"position":0},"title":"QGIS ModelBaker","author":"Marco Bernasocchi","date":"6 Marzo 2023","format":false,"excerpt":"Nach Abschluss des Kurses kennen die Teilnehmer:innen alle Funktionen vom QGIS Model Baker und k\u00f6nnen INTERLIS Modelle in der Datenbank abbilden und Transferdateien importieren und exportieren. Ausserdem wird eine Einf\u00fchrung ins Handling mit Beh\u00e4lter und Datasets gegeben und der Live Validator vorgestellt.","rel":"","context":"In &quot;INTERLIS &amp; Model Baker Kurse&quot;","block_context":{"text":"INTERLIS &amp; Model Baker Kurse","link":"https:\/\/www.opengis.ch\/de\/category\/kurse\/interlis-model-baker-kurse\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":15041,"url":"https:\/\/www.opengis.ch\/it\/2023\/03\/06\/qgis-model-baker\/","url_meta":{"origin":13328,"position":1},"title":"QGIS ModelBaker","author":"Marco Bernasocchi","date":"6 Marzo 2023","format":false,"excerpt":"Nach Abschluss des Kurses kennen die Teilnehmer:innen alle Funktionen vom QGIS Model Baker und k\u00f6nnen INTERLIS Modelle in der Datenbank abbilden und Transferdateien importieren und exportieren. Ausserdem wird eine Einf\u00fchrung ins Handling mit Beh\u00e4lter und Datasets gegeben und der Live Validator vorgestellt.","rel":"","context":"In &quot;Cours INTERLIS &amp; Model Baker&quot;","block_context":{"text":"Cours INTERLIS &amp; Model Baker","link":"https:\/\/www.opengis.ch\/fr\/category\/cours\/cours-interlis-model-baker\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":15039,"url":"https:\/\/www.opengis.ch\/fr\/2023\/03\/06\/qgis-model-baker\/","url_meta":{"origin":13328,"position":2},"title":"QGIS ModelBaker","author":"Marco Bernasocchi","date":"6 Marzo 2023","format":false,"excerpt":"A l'issue du cours, les participants connaissent toutes les fonctions de QGIS Model Baker, peuvent repr\u00e9senter des mod\u00e8les INTERLIS dans la base de donn\u00e9es et importer et exporter des fichiers de transfert. En outre, une introduction au maniement des conteneurs et des jeux de donn\u00e9es est donn\u00e9e et le Live\u2026","rel":"","context":"In &quot;Cours INTERLIS &amp; Model Baker&quot;","block_context":{"text":"Cours INTERLIS &amp; Model Baker","link":"https:\/\/www.opengis.ch\/fr\/category\/cours\/cours-interlis-model-baker\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":13388,"url":"https:\/\/www.opengis.ch\/it\/2022\/11\/10\/model-baker-kurs-zurich-26-01-2023\/","url_meta":{"origin":13328,"position":3},"title":"QGIS Model Baker Kurs Z\u00fcrich, 26.01.2023","author":"Anna Randegger","date":"10 Novembre 2022","format":false,"excerpt":"Anmelden Der Kurs dauert einen Tag (9:00 \u2013 17:00 Uhr) und kostet 560 CHF pro Person (inkl. Mittagessen und Kursbest\u00e4tigung). Ein Lehrer f\u00fcr maximal 6 Personen und 2 Lehrer f\u00fcr 7 bis 12 Personen. Mindestteilnehmerzahl 6 Personen. Beschreibung Nach Abschluss des Kurses kennen die Teilnehmer:innen alle Funktionen vom QGIS Model\u2026","rel":"","context":"In &quot;QGIS&quot;","block_context":{"text":"QGIS","link":"https:\/\/www.opengis.ch\/it\/category\/gis\/qgis\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":14123,"url":"https:\/\/www.opengis.ch\/de\/2024\/02\/07\/qgis-model-baker-und-interlis-kurse-2023\/","url_meta":{"origin":13328,"position":4},"title":"QGIS Model Baker und INTERLIS Kurs 2024","author":"Dave Signer","date":"7 Febbraio 2024","format":false,"excerpt":"Der Tageskurs f\u00fcr QGIS Model Baker und das vorg\u00e4ngige INTERLIS Crash-Webinar erfreuten sich letztes Jahr grosse Beliebtheit. Deshalb m\u00f6chten wir es dir auch dieses Jahr erm\u00f6glichen INTERLIS-Modelbackmeister:in zu werden\ud83e\uddc1 Das INTERLIS Webinar beinhaltet die Grundkenntnisse, die f\u00fcr den QGIS Model Baker Kurs vorausgesetzt werden. Allerdings k\u00f6nnen die beiden Kurse unabh\u00e4ngig\u2026","rel":"","context":"In &quot;Unkategorisiert&quot;","block_context":{"text":"Unkategorisiert","link":"https:\/\/www.opengis.ch\/de\/category\/unkategorisiert\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/11\/modelbaker_course.png?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":13203,"url":"https:\/\/www.opengis.ch\/de\/2022\/10\/07\/model-baker-7-2-ist-draussen\/","url_meta":{"origin":13328,"position":5},"title":"Model Baker 7.2 ist draussen","author":"Dave Signer","date":"7 Ottobre 2022","format":false,"excerpt":"Der neue Release vom QGIS Model Baker Plugin ist draussen, mit weiteren Verbesserungen des Import\/Export Wizards, mehr M\u00f6glichkeiten in der INTERLIS Validierung der Daten und einem super-komfortablen Exporter f\u00fcr UsabILIty Hub Toppingfiles. Was ist Model Baker? Dieser erste Abschnitt kann wohl von den meisten Leser:innen \u00fcbersprungen werden. Trotzdem hier eine\u2026","rel":"","context":"In &quot;GIS&quot;","block_context":{"text":"GIS","link":"https:\/\/www.opengis.ch\/it\/category\/gis\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/10\/exporter.png?fit=1200%2C782&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/10\/exporter.png?fit=1200%2C782&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/10\/exporter.png?fit=1200%2C782&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/10\/exporter.png?fit=1200%2C782&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.opengis.ch\/wp-content\/uploads\/2022\/10\/exporter.png?fit=1200%2C782&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/pbdBtI-3sY","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/posts\/13328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/comments?post=13328"}],"version-history":[{"count":17,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/posts\/13328\/revisions"}],"predecessor-version":[{"id":14946,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/posts\/13328\/revisions\/14946"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/media\/13348"}],"wp:attachment":[{"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/media?parent=13328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/categories?post=13328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.opengis.ch\/it\/wp-json\/wp\/v2\/tags?post=13328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}