Configuration file

A configuration file is an ASCII file, used in the GeoDMS to store logical parts of the modelling logic.

A configuration file in the GeoDMS always has one and only one parent-item.

Configuration file can include other configuration files by using the include statement.

Configuration files can be viewed or edited with a configuration-file-editor.

Configuration files always use the extension: .dms

contents

In a configuration file can be configured:

primary data

Configuration files can also contain (small parts) of primary data.

small data items

For small data items like case parameters or class boundaries/labels in classifications it is common to store these values in configuration files, see example:

<uint32> ClassUnit : nrofrows = 4 
{
   attribute<meter>  ClassBreaks : DialogType = "Classification", [0,200,400,800];
   attribute<string> Label       : DialogType = "LabelText",      ['0 - 200','200 - 400','400 - 800','> 800'];
}

Since version 7.199, is it also possible to configure data in such a way for domains with 0 entries, see empty-domain

Primary data for data items is configured between square brackets [], comma separated. String values need to be single quoted. Configure a value for each entry of the domain unit.

two dimensional data items

To configure two dimensional data items (coodinates), use the following syntax

unit<uint32> PointSet : nrofrows = 4 
{
   attribute<fpoint> geometry : 
   [
      {0,0},{1,1},{2,2},{3,3}
   ];
}

tabular data

Configuring attribute values as in the earlier example is not so user-friendly for tabular data with multiple attributes. With the following configuration example, primary data can be stored in a configuration file and be edited as a table:

unit<uint32> supermarket: NrOfRows = 3
{
    parameter<uint32> nrAttr := 5;
    unit<uint32> elem := range(uint32, 0, nrAttr *#supermarkt) // domain of all cells in a table`
    {
        attribute<string> values: [
        // 'name'      ,'street'           ,'housenr' ,'zipcode'  ,'place'
           'Plusmarkt' ,'Amerikaplein'     , '2'      ,'6269DA'   ,'Margraten',
          ,'Lidl'      ,'Wilhelminastraat' ,'63'      ,'6245AV'   ,'Eijsden',
          ,'Spar'      ,'Dalestraat'       ,'23'      ,'6262NP'   ,'Banholt'
        ];
    }
    attribute<.> id := id(.);

    attribute<string> name    := elem/values[value(id * nrAttr + 0, elem)];
    attribute<string> street  := elem/values[value(id * nrAttr + 1, elem)];
    attribute<uint32> housenr := uint32(elem/values[value(id * nrAttr + 2, elem)]);
    attribute<string> zipcode := elem/values[value(id * nrAttr + 3, elem)];
    attribute<string> place   := elem/values[value(id * nrAttr + 4, elem)];
   }
}

In this example the primary data is configured for the supermarket/elem/values data item. The values are presented and can be edited as a table. All data values are configured as string values.

The trick here is that the data is not configured per attribute but for a new domain unit: elem, which is the domain unit of all cells in a table. This elem domain can be formatted in a tabular way (see example). Later on the correct values per attribute are selected from the elem domain with lookup functions. Conversion functions are used to convert the original string values to their requested value-type.