-
Notifications
You must be signed in to change notification settings - Fork 0
Module 1d, Learning the basic concepts of GeoDMS, classifying and visualising data
learning objective: Learning how to classify your data and or use code units for visualisations
Classifying your data, e.g., visualising data in maps, is an intuitive way of working with multiple domain units.
Start this module by downloading the example project here, unzip the downloaded project file to a projDir like C:/prj/GeoDMSAcadamy and open the file: exercise.dms in the GeoDMS_Academy\basics_classify_and_visualise\cfg subfolder of your downloaded project with the GeoDMS GUI.
Double-click on the item SourceData/province/inwoners in the Treeview, and a map appears, with the GeoDMS GUI's default classification made.
In this map we see that the attribute: nrinhabitants is classified into 8 classes. In the legend, we see the class number (0..7) for the layer, the lower class break and the number of occurrences of the provinces for this class.
So, in this example, the original domain unit province with 12 entries is classified as a new class domain unit with 8 entries.
Classifying your data in the GeoDMS means an original numeric attribute is related to a class unit with a class breaks attribute.
The number of classes is usually (much) smaller than the number of entries in the original domain. A class unit is, therefore, useful for instance to configure visualisation style, like colours, symbols or pen styles.
In the example, the class unit was configured implicitly. This is nice to make a default map, but if we want to configure our own number of classes, class breaks and visualisation styles, we need to configure a class unit explicitly.
See the m4_k domain unit of Example 1 on the classification page for an example of how to configure a class unit. Some relevant characteristics of such a class domain unit are:
- The value type of the domain unit is usually uint8, as the number of classes is usually less than 256.
- The number of rows is usually explicitly configured with the NrofRows property or with the range function.
- A ClassBreak attribute is configured, usually as subitem of the class unit, with the values unit of the item in the original domain unit to be classified and with the DialogType property configured to: "Classification". The ClassBreak item configures the start/lowest value of the class. The end/highest value of the class is the ClassBreak value of the next entry. The last class always has an open end.
- One or more visualisation styles, such as colours, pen styles, and symbols, are configured as attributes for this domain.
There are two ways how attributes in the original domain unit can be related to the class unit in order to make a classified map:
- by classifying the data with the classify function, resulting in a new attribute with the index numbers of the class unit (a relation).
In the example, the configuration would look like this (assume we configured a province_size class unit with a ClassBreaks attribute) in the Classifications container:attribute<Classifications/prov_size> province_size_rel (.) := classify (inhabitants, Classifications/province_size/ClassBreaks);
- by using the cdf property. The cdf property can be configured for the original item (inwoners) with a reference to the same ClassBreaks item. The cdf property could also be configured for the values unit (in this case, nr_inh).
If the resulting items from options 1 or 2 are requested in a map view, a classified thematic map is made in both cases.
The difference is that with option 1, a new relation is configured explicitly (and can also be used for other purposes like aggregating data), while in the second example, the classification is made implicitly by the GeoDMS GUI (like with the default classification)
For each class in a class unit, one or more visualisation styles can be configured. The DialogType classification is used to indicate for which purpose the style is used.
it is important to understand your data, especially the feature attribute. Visualisation styles differ for point, arc, polygon and grid data.
See the pages visualisation styles for instructions on how to configure different styles.
There is a difference between class units and code units.
Code units define the unique occurrences of categorical data. Consider, for example, the energy labels of residences. This is a limited list of labels from A to G.
Code units can also be used to make thematic maps, with visualisation styles configured for each code.
Code units are often initially configured with a unique function, but if the number of entries is known, it is advised to configure the number of rows explicitly.
An example of a code unit:
unit <uint8> EnergyLabel: nrofrows = 7 { attribute<string> code : DialogType = "LabelText", ['A','B','C','D','E','F','G'];` attribute<uint32> BrushColor: DialogType = "BrushColor", [rgb(0,255,0),rgb(35,215,0),rgb(70,175,0),rgb(105,140,0),rgb(140,105,0),rgb(175,70,0),rgb(210,35,10)]; }
Class units (with a class break attribute) are used to classify numerical attributes; code units define the set of unique occurrences of categorized attributes.
The relation towards the code unit is usually configured with a rlookup function towards the attribute with the unique codes.
In the example configuration, configure:
- the 2 options (see how to refer to a class unit) to make a thematic map of the inwoners attribute with different colours for each class
- code units for the landsdeel and the ligging
- the attributes to make thematic attributes for landsdeel and ligging. Tip: use the unique operator to make your code unit.
First, try to figure it out yourself. The configuration with the results is also available in the downloaded project; just open the result.dms file with the GeoDMS GUI in the cfg subfolder of your downloaded project.
Go to previous module: Module 1c, Learning the basic concepts of GeoDMS, calculations over multiple domains
Go to next module: Module 2, Loading and storing data sources
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