Feature Renderer

Renderers dictate how layers are drawn on the map. This is not about the symbolism but about the logic of the display:

  • Simple: Every object (feature) has the same symbol.

  • Categorized: Objects (features) are divided into categories. This can be done based on attribute values or ranges of values.

  • Renderer Groups: Renderers can even be grouped/combined. For example, a layer can be drawn differently in different scale ranges.

To set the Renderer, select the layer in the TOC and open the dialog via the context-sensitive tool Layer Settings. There, switch (on the left) to the section Feature Renderer:

../../_images/renderers1.png

Simple Renderer

In this example, the Simple Renderer is preset. It assumes that the same symbolism is used for each Feature. The corresponding symbol can be edited in the right area of the dialog.

Simple Renderer (Aggregated)

Similar to the Simple Renderer. However, here the features are not immediately drawn but are first collected internally in a GeometryAggregate and then rendered. This renderer has an experimental character. The Simple Renderer is preferred.

Value Map Renderer

Another often-used renderer is the Value Map Renderer. This renderer categorizes features based on attribute values. An attribute of the layer can be defined for this purpose. Features with the same attribute value are displayed with the same symbol.

In the dialog (on the right), first select the attribute. Then, using the buttons below the field selection, there are several options to define categories:

  • Add all values: Reads all possible categories from the layer and creates a random symbol for each category.

  • Add value: Manually sets a category.

  • Add “All Other”: Adds an All Other category. This allows assigning a symbol for all features that do not fall into any of the listed categories. Without this category, these features would not be drawn.

  • Remove All: Removes all categories.

An example would be to display all municipalities differently based on the state they are in. Simply select LAND (=STATE) as the field and click on Add all values:

../../_images/renderers2.png

On the map, the result would look something like this:

../../_images/renderers3.png

To change a symbol in the Renderer dialog, simply click on the symbol in the corresponding category. The Symbol Mask opens below the category while the list stays in place. From there, it is possible to open the Symbol Composer again. Another click on the symbol or the ✕ closes the mask; only one mask is open at a time. A single category can be deleted with the trash can symbol.

At the bottom of the list, there are additional buttons:

  • Rotation: This setting is only possible for point themes. Here, it can be specified whether the symbols should be rotated based on an attribute value. This button is also offered with the Simple Renderer if the layer is a point theme. The rotation is only applied if a Field Name is specified:

    ../../_images/renderers4.png
  • Cartography: Here, it can be more precisely determined in which order the features should be drawn. Simple draws the features in the order they come from the database. Legend Ordering draws the features based on the legend, meaning each category is drawn separately. This can ensure that superior features are always drawn over subordinate features (highways over country roads). Legend And Symbol Ordering additionally considers the individual symbol layers (Symbol Stack from the Symbol Composer):

    ../../_images/renderers5.png

Change all symbols at once

With many categories, there is no need to click every symbol one by one. The More ... menu has two entries that work on all categories at once. Both are also available in the Many Value Map Renderer and the Quantity Renderer:

  • Recolor …: Assigns new colors in the order of the list. The options are:

    • Palette: predefined color palettes. Sequential (e.g. Viridis, Blues, YlOrRd) and diverging (RdYlGn, RdBu) palettes are spread over the number of categories. Qualitative palettes (Set1, Set3, Paired) repeat when there are more categories than colors.

    • Gradient (2 colors): a gradient from a start color to an end color.

    • Random: random colors (as with Add all values).

    Reverse reverses the order. For polygons, you can choose whether the fill, the outline or both are recolored. The existing transparency of each symbol is kept.

  • Set Symbol Properties …: Sets single properties of all symbols to the same value, e.g. the line width. Only checked properties are applied; all others are kept per category. Depending on the geometry type, there are Color, Width or Outline width, Dash style, Fill opacity, Size and Smoothing.

The All Other category is left out by default and can be included in the dialog. Categories with composite symbols (e.g. from the Symbol Stack of the Symbol Composer) are skipped. The dialog shows how many there are.

Note

The changes take effect with Apply. Cancel in the layer dialog discards them.

Undo

Above the list, Undo takes back the last change to the categories; the button names it (e.g. Undo Recolor). Up to 20 steps can be undone. Undo covers Add all values, Remove All, Remove, if not exists in source, Remove selected, deleting and moving single categories, Recolor …, Set Symbol Properties …, pasting symbols, Apply to …, Order by …, Label Style …, Data Value => Label and the Wizard of the Quantity Renderer. Changes in the Symbol Mask of a single category have their own Undo there. When the field changes, the undo steps start over.

Number of features per category

Add all values also counts how many features fall into each category. For existing categories the More ... menu has the entry Count Features. The number is shown on the right of the list; categories without features are greyed out. All Other shows the features that fall into no other category. Counting uses the filter of the layer. The numbers are not saved.

Order by … sorts the list by label, value or (if counted) by number of features; All Other always stays at the end. Select empty selects all categories without features, e.g. to remove them with Remove selected.

Selecting categories

Each category has a checkbox on the left. Holding Shift selects a whole range; above the list there are All, None, Invert and Remove selected.

If anything is selected, Recolor …, Set Symbol Properties … and pasting symbols only affect the selected categories, otherwise all of them. The selection is reset when the field changes and is not saved.

Copying and pasting symbols

Wherever the Symbol Mask is shown, there are Copy symbol and Paste symbol buttons next to Random and Undo. A copied symbol can also be pasted into another layer (e.g. into the Simple Renderer) as long as the geometry type matches. Pasting into a single symbol mask can be reverted with Undo.

For whole categories there are two ways:

  • In the More ... menu: Paste Symbol and Paste Symbol, keep colors paste the copied symbol into the selected categories (without a selection into all except All Other).

  • In the Symbol Mask of a category: the Apply to … menu below the settings transfers the symbol of this category to the selected or all other categories.

The symbol is replaced completely; the label of the category is kept. With keep colors each category keeps its color (for polygons fill and outline separately), everything else (line width, dash style, transparency, …) comes from the pasted symbol. This is the fastest way to apply, for example, a dash style to all categories. keep colors is only available for simple symbols. Categories that had a composite symbol get the colors of the pasted symbol; a message shows how many there were.

Many Value Map Renderer

This renderer is similar to the Value Map Renderer. However, up to three fields can be specified here that determine the category:

../../_images/renderers6.png

Quantity Renderer

With this renderer, features are categorized based on numerical value ranges, for example, based on area. An easy way to define the categories is provided by the Wizard:

../../_images/renderers7.png

The Wizard determines the maximum and minimum of the value range and assigns random symbols for these. These values and symbols can still be manually changed here. For the intermediate steps, a fixed step width or a fixed number of steps can be chosen.

../../_images/renderers8.png

When you click on Calc, the intermediate steps are calculated and displayed below. If the categories do not meet expectations, this step can be repeated until the result is correct. Afterward, the Wizard can be closed with Close.

The Wizard also attempts to create a smooth transition between the starting and ending symbols:

../../_images/renderers9.png

In the wizard you can also choose:

  • Method: Equal Interval divides the value range into classes of the same width (fixed number or fixed step width). Quantile creates classes with as close to the same number of features as possible. Natural Breaks (Jenks) puts the limits at the natural gaps of the values. With very many values an even sample of 5000 values is used for this.

  • Colors: Minimum to maximum symbol interpolates between the two symbols as above. Palette takes the style of the minimum symbol and assigns the colors from a palette (as with Recolor …).

  • Decimals: number of decimals of the class limits and labels (e.g. 10 – 20). The suggestion is derived from the value range. The decimal separator is always a point.

Minimum, maximum and classes respect the filter of the layer. After creating the classes the number of features per class is shown.

Scale Dependent Renderer

This is a Renderer group. Here, multiple Renderers can be defined, each applied within specified scale limits. Renderers can be added via the Add menu:

../../_images/renderers10.png

Each row corresponds to a renderer. The order can be changed by dragging with the left mouse button. The corresponding renderer can be edited via the Edit icon (pencil). A renderer can be removed from the list using the Delete icon (trash can). Further settings can be made via the Settings icon (gear). These include the scale limits within which the Renderer should be applied:

../../_images/renderers10.png

Group Renderer

In principle, this corresponds to the Scale Dependent Renderer but without scale limits.