Chapter 5. Layer Classifications

A layer classification is a way of assigning drawing properties to groups of shapes based on attributes stored in the layer's table. Only layer's with shapes can have a classification; image layers cannot be classified.

A classification consists of a number of groups, each group having a value or range of values to match against, and symbol properties which control how a shape is drawn on the map. The user selects which field in the table is used by the classification and when the map is drawn the value for that field for each shape is compared with each group's value. The properties of the first group to match are used to draw the shape. This allows the user to get a visual impression of not only how the data is laid out but also what kind of data lies where.

A layer always has a classification. When a new layer is added to the map, a default classification is created with the DEFAULT group. This group cannot be removed but can be hidden (see below). Every shape in the layer, regardless of its attributes, will match this group if no other group matches.

5.1. Editing Classifications

A layer's classification can be modified under the properties dialog (Layer->Properties). The layer's classification field can be set to None, which simply assigns a DEFAULT group to the classification. No new groups can be added to the classification if the field is None. The user must first select a field to classify on. New groups can be added to the classification with the Add button.

To apply the changes to the map the user can click either Try or OK. Try will not close the dialog box, allowing the user to see how the classification changes the map. Revert will undo the last classification applied to the map. OK will commit the changes and close the dialog. The user will be unable to undo the changes. Close simply closes the dialog box. If any changes have not been applied with Try the changes will not be applied to the map.

Figure 5-1. Properties Window

The order of the groups in the classification is significant except for the DEFAULT group, which remains at the top. When shapes are matched against groups the matching begins at the first group after the DEFAULT group so that groups higher in the list will be checked first. Matching for a given shape will stop at the first group that matches. The user can use Move Up and Move Down to change the order of the groups. The DEFAULT group will always match a shape that hasn't matched another group.

5.1.1. Visible

The Visible column has check-boxes that determine whether a classification group will be displayed in the legend. This is useful if the user knows that the groups completely cover the data set and don't want the DEFAULT group to be displayed in the legend and on a printout.

5.1.2. Symbols

Each type of shape has its own type of symbol. Thuban supports three types of shapes: polygons, lines, and points. Polygons and points have outline and fill color, while lines have only line color. Each group has associated symbol properties. To edit the symbol properties for a group the user can double click on the Symbol column or select a group and click the Edit Symbol button.

5.1.3. Value

The Value column of the classification table is the value that will be matched when the map is being drawn. The type of data that can entered into this field depends on the type of data of the classification field.

If the field is of type Text, anything entered into the field is valid. The text will be compared literally to the value of the shape attribute, including case sensitivity. If the type is Integer, then any valid integer may be entered. In addition, with special syntax, a range of values can be entered. A range from start to end inclusive is specified like this: [start;end]. The exclusive range is specified like this: ]start;end[. Ranges can include infinity like this: [-oo;oo]. Field types can also be of type Decimal. They represent any rational number and can be used in ranges as well.

5.1.4. Label

By default, the text that is displayed for a group in the legend is the value for that group. The label can substitute a more descriptive term in the legend.