You can modify the display of a layer based on values of its attributes. Operations can be performed based on distinct or continuous values.

Here are some examples of classification based on the distinct values.

To perform Classification on tutorial data click here to download data.

Set a label and classification expression

Expression is automatically generated field that contain expression for each class. While editing expression values make sure that you type exact value as written in the Data Grid. Note that features that don’t satisfy any condition will not be visible on the map.

layer s manuala

 

class4

If you want to rename a class, you can do it by clicking Label button in the Layer Properties. Label is class name visible in the Layer List. While renaming a class make sure that you are not in the “Expression” mode.

layer s manuala2

 

class3

 

Example 1. Change a value of one class

  1. Open a Layer Properties (Layer tab-Edit layer).
  2. Click Wizard button.
  3. Select the Distinct radio button.
  4. Select the field whose values will define the layer display.
  5. Click Calculate button.
  6. Change a value of expression.
  7. Click Save.

Note: values are case sensitive.

layer s manuala3

Example 2. Extract one class and put all other data into another class

It is possible to extract one class and put all other values into another class.

NMT_Classification1

  1. Open a Layer Properties (Layer tab-Edit layer).
  2. Click Wizard button.
  3. Select the Distinct radio button.
  4. Select the field whose values will define the layer display.
  5. Click Calculate button.
  6. In the first expression box write value that you want to extract (name_2=’Anosy’).
  7. In the second expression box write: 1.
  8. Click Save button.

layer s manuala4

Example 3. Display values of one class

NMT_Classification5

  1. Open a Layer Properties (Layer tab-Edit layer).
  2. Click Wizard button.
  3. Select the Distinct radio button.
  4. Select the field whose values will define the layer display.
  5. Click Calculate button.
  6. In the expression box write value that you want to extract (name_1=’Antananarivo’).
  7. Delete all other classes.
  8. Click Save.

layer s manuala5

Example 4. Display more values in one class.

You can display more values in one class using operator ‘OR’.

NMT_Classification6

  1. Open a Layer Properties (Layer tab-Edit layer).
  2. Click Wizard button.
  3. Select the Distinct radio button.
  4. Select the field whose values will define the layer display.
  5. Click Calculate button.
  6. In the expression box write first expression (name_2=’Analamanga’).
  7. In the same expression box write OR.
  8. Write second expression (name_2=’Boeny’).
  9. Click Save.

layer s manuala6

Example 5. More complex expression

Display features that contain value Analamanga and Ihorombe or if this feature doesn’t exist display features with value Bongolava.

NMT_Classification8

  1. Open a Layer Properties (Layer tab-Edit layer).
  2. Click Wizard button.
  3. Select the Distinct radio button.
  4. Select the field whose values will define the layer display.
  5. Click Calculate button.
  6. In the expression box write first expression (name_2=’Analamanga’).
  7. Write operator AND.
  8. In the expression box write second expression (name_2=’Ihorombe’).
  9. Write operator OR.
  10. In the expression box write third expression (name_2=’Bongolava’).
  11. Click Save button.

layer s manuala7

Example 6. Display all classes except one

NMT_Classification11

  1. Open a Layer Properties (Layer tab-Edit layer).
  2. Click Wizard button.
  3. Select the Distinct radio button.
  4. Select the field whose values will define the layer display.
  5. Click Calculate button.
  6. In the expression box write operator AND NOT.
  7. In the expression box write expression that you don’t want to see (name_2=’Sofia’).
  8. Click Save.