-
Notifications
You must be signed in to change notification settings - Fork 0
Module 1a, Learning the basic concepts of GeoDMS, naming items and namespaces
learning objective: learning how to name items in the GeoDMS and understanding namespaces
In programming languages, variables are often indicated as A, B, C,..., I. In a spreadsheet, cells are indicated by row and column names, for instance, cell A1. Naming your modelling elements in such a way, with abstract, non-meaningful characters, is simple and works for small models. When models get larger, this is less suitable for understanding, maintaining and sharing your model.
In the GeoDMS, which focuses on transparent modelling, we try to solve this in two ways:
- Tree item naming
- Using a NameSpace structure
The GeoDMS syntax supports this, and we advise using clear, meaningful, and unambiguous tree item names for items in your model. An attribute with the number of inhabitants of a region should be named inhabitants or nr_inhabitants and not only the name i or vari.
The following syntax rules apply for tree item names:
- may only contain (alpha)numeric characters and underscores
- may not start with a numeric character
Syntax rules are required, and most other advice concerning tree item names are conventions.
Reading tip: for more information, see the page: naming conventions
In the previous paragraph, we mentioned an attribute: nr_inhabitants. Such an attribute needs to be interpreted in a particular context. Does it apply to the number of inhabitants of a country or region for a specific year, for the actual situation for a modelled scenario, etc? Space, time, and scenario are amongst other potential relevant modelling dimensions. If they are relevant in the context of your model, they should become part of the full name of a tree item.
The full name of a tree item is the name of the item itself and all its parents. This full name should contain all relevant aspects to interpret the tree item. The NameSpace concept in the GeoDMS relates to this idea of context. A set of parent items defines a specific context. Within this context, names need to be clear and unique but should not redundantly contain information already defined by the parents.
This NameSpace is relevant in how items refer to each other. Within the same context (subitems of the same parent item, items that refer to different items, in that context, it is sufficient only to use the name. If an item refers to another item in another context, the relevant part of the context (relevant parents' names) needs to be added to the reference.
Reading tip: for more information on how items can refer to other items, see the page: NameSpace
In this exercise, you will learn how to name tree items and how to refer to other tree items.
- Download the project here and unzip the downloaded project file to a projDir like C:/prj/GeoDMSAcadamy.
- Open the file exercise.dms (in the GeoDMS_Academy\basics_naming_items\cfg subfolder of your downloaded project) with the GeoDMS GUI.
- Try to open items in the GeoDMS GUI in the Results -> province container; you see items in red indicating errors. These errors are made on purpose!
The errors result from some items referring to other items that can not be found.
In this exercise, we ask you to solve the following issues in this configuration file:
- The Tree item names in the configuration do not always correspond with the naming conventions of the GeoDMS. Could you try to solve these naming issues?
- The red items must be solved using the correct tree item names. Could you try to solve these issues?
First, could you try to figure it out yourself? The configuration with the results is also available in the downloaded project; open the result.dms file with the GeoDMS GUI in the cfg subfolder of your downloaded project.
The result configuration shows an example (and an alternative) for a working implementation according to the naming conventions. Other solutions are also possible.
Go to previous module: Module 1, Learning the basic concepts of GeoDMS
Go to next module: Module 1b, Learning the basic concepts of GeoDMS, understanding units
GeoDMS Academy
- 0: Install GeoDMS GUI and setup a configuration
- 1: Learning the basic concepts of GeoDMS
- 2: Loading and storing data sources
- 3: Basic analyses with vector data (WORK IN PROGRESS)
- 4: Basic analyses with grid data (WORK IN PROGRESS)
- 5a: Working with networks over a road network
- 5b: Working with networks in a public transport setting
- 6: Allocating land-use