Skip to content

Technical Concept

Just as we can now find INTERLIS models by searching the ilimodels.xml file from and the linked repositories, we can find additional information via the ilidata.xml file.


The entry point is not but, which in turn links to

Settings for tools (like ili2db or Model Baker) are configured in a metaconfiguration file, as well as links to topping files that contain information about GIS project (such as symbologies or legend structures). Thus, this additional information usually consists of a metaconfiguration and any number of toppings.


The ilidata.xml

An ilidata.xml serves as an index for all required additional information. The file is based on the DatasetIdx16 model.

It contains the class (elements) DatasetMetadata. There are files referenced that are on the same server/repository as the ilidata.xml.

Additional servers/repositories can be linked via the ilisite.xml. The DatasetMetadata are identified by a cross-system (cross-repository) DatasetMetadata-Id. It is up to the user what this id is.

Example of a DatasetMetadata element

<DatasetIdx16.DataIndex.DatasetMetadata TID="be6623c1-aa64-4a07-931e-fc4f0745f025">
          <Text>Einfaches Styling und Tree (</Text>
      <!--  dieser Eintrag betrifft das Modell KbS_LV95_V1_4  -->
      <!--  Konvention:{MODELNAME}  -->
      <!--  dieser Eintrag betrifft eine Metakonfigurationsdatei -->
      <!--  fix Wert fuer Metaconfigs  -->
      <!--  Codes können auch generisch sein  -->
      <!--  müssen aber eine URL sein  -->
          <!--  realtiver Pfad (zu ilidata.xml) der Metaconfig Datei  -->


The categories element in the DatasetMetadata contains a list of Code_ elements. These can be used for filtering. In the context of the UsabILIty Hub, the following two categories are primarily used.


The category for the model is identified with the prefix and contains the model name.



The category for the file type is identified with the prefix and contains the type in question.


In the UsabILIty Hub implementation of the Model Baker, the following types are used: - metaconfig to describe that it is a metaconfiguration file. - metaattributes to describe that it is a meta attribute file written in TOML or INI. - sql to describe that it is a SQL query file that can be used when creating the database - projecttopping to describe that it is a toppingfile that defines a qgis project setting (includes the full layertree implementation and replaces that) - layerstyle to describe that it is a toppingfile that can contain styling and form configurations for a QGIS layer written in QML - layerdefinition to describe that it is a toppingfile that can contain the definition of a QGIS layer written in QLR - referenceData to describe that it is a data file (e.g. a transfer file or a catalog)


However, the content of the Code_ element is not strictly defined. As long as it is a URL, it is up to the tool developer how she wants to use it.

At the moment the Model Baker uses a generic category to know for what data source this topping is made for: what can be pg and gpkg.

The ilisite.xml

The ilisite.xml is based on the model IliSite09. It contains the class (elements) SiteMetadata where URLs to other repositories are defined. These repositories in turn manage an ilimodel.xml or - likewise - an ilidata.xml.

Thus, models can be found across multiple repositories and so can metaconfigurationfiles and/or toppingfiles.

Example of a IliSite09 element

<IliSite09.SiteMetadata.Site TID="1">
  <Title>Allgemeine metadaten für ili-modelle</Title>
  <shortDescription>Weitere Sites des UsabILItyHubs</shortDescription>

The Metaconfiguration File (ini)

A metaconfigurationfile is an ini file that contains configurations for one or more tools. Likewise, topping files and other files belonging to the configuration can be referenced in this metaconfiguration file.

File References

The files are either referenced by a cross-system-wide DatasetMetadata-Id or they can be referenced by a static file path.

DatasetMetadata Id

When a file is referenced by a DatasetMetadata-Id, it means that the ilidata.xml are parsed across repositories to find the linked file. This means that the metaconfiguration cannot only reference files on the same repository/server. Prefix for DatasetMetadata-Ids is ilidata:.

It is generally recommended to use the DatasetMetadata-Id for a reference to a file (instead of the static file path).

Static File Path

Static file path links referenced with file: can be both absolute and relative. However, it may depend on the tool used to what the path is relative. Therefore this should only be used for testing purposes.

The Model Baker handles relative paths relative to itself. ili2db on the other hand relative to the directory where ili2db is started.


defaultSrsCode = 2056
smart2Inheritance = true
strokeArcs = false
importTid = true
createTidCol = false
models = KbS_Basis_V1_4

"Belasteter_Standort (Geo_Lage_Polygon)"=file:toppings_in_modelbakerdir/layerstyle/opengisch_KbS_LV95_V1_4_001_belasteterstandort_polygon.qml
"Belasteter_Standort (Geo_Lage_Punkt)"=ilidata:ch.opengis.topping.opengisch_KbS_LV95_V1_4_001

For example, the id ch.opengis.configs.KbS_LV95_V1_4_projecttopping references a DatasetMetadata that contains a link to a yaml file where the project settings like the legend structure is defined. The id ch.opengis.configs.KbS_LV95_V1_4_001 points to a DatasetMetadata element which contains a link to an qml file for QGIS style and form configurations.

Whole sections can also be defined. The section qgis.modelbaker.qml contains besides the link also the mapping of layer names to qml files. The mapping in the metaconfigurationfile is deprecated. This should be done in the project topping file.

Tool Prefix

In the metaconfiguration file entries can be marked with a tool prefix. ili2db for example uses the prefix ch.ehi.ili2db and the Model Baker uses the prefix qgis.modelbaker. However, it is up to the tool which configurations it uses. The prefix ch.interlis, which is used with ch.interlis.referenceData for example for the reference to data files like catalogs or transfer data files, is used by ili2db as well as the Model Baker.

References to other Metaconfiguration Files

It is also conceptually possible (although not yet implemented by tools like the Model Baker) that one can link from one metaconfiguration file to other metaconfiguration files using the baseConfig entry. Thus a kind of "inheritance" of the configuration would be possible.

Topping Files

Topping files are files that are referenced by the metaconfiguration and contain the configuration information of a GIS project. They can be form configurations, style attributes, legend display and order, as well as catalogs, transfer files and other data files. Individual topping files can be used for each tool. From a simple zip file containing the whole project to a careful mapping of layer names to qml style files.

Example of a Projecttopping File (yaml) of the Layertree in QGIS

  - 'top-group':
      group: true
      checked: true
      expanded: true
      mutually-exclusive: true
      mutually-exclusive-child: -1
        - 'geom punkt':
            group: false
            definitionfile: "ilidata:ch.opengis.topping.opengisch_KbS_LV95_V1_4_005"
        - 'geom polygon':
            group: false
            checked: true
            qmlstylefile: "ilidata:ch.opengis.topping.opengisch_KbS_LV95_V1_4_005"
        - 'subgroup':
            group: true
              - 'subsubgroup':
                  group: true
                  checked: true
                    - 'baum':
                        group: false
                        checked: true
                    - 'subsubsubgroup':
                        group: true
                        checked: true
                          - 'another layer':
                              group: false
                              checked: false
                    - 'layer in the subgroup':
                        group: false
                        checked: false
  - "Map":
        provider: "wms"
        uri: "contextualWMSLegend=0&crs=EPSG:2056&dpiMode=7&featureCount=10&format=image/jpeg&layers=ch.bav.kataster-belasteter-standorte-oev_lines&styles=default&url="

  - 'geom punkt'
  - 'geom polygon'