3. Using Custom Symbology

QGIS provides many features for styling and improving the look of your maps. The custom symbologies and scale-dependent rendering are possible for any vector type.

Many of these customizations are available using the New Symbology feature in the layer Properties window.

Note

There are three types of symbols: marker symbols (for points), line symbols (for lines) and fill and outline symbols (for polygons). Symbols can consist of one or more symbol layers. It is possible to define the color of a symbol and this color is then defined for all symbol layers. Some layers may have the color locked - for those the color can not be altered. This is useful when you define the color of a multilayer symbol. Similarly, it is possible to define the width for line symbols, as well as size and rotation for marker symbols.

More information is available in the QGIS User Guide.

For this exercise, we will use pre-defined custom symbols for several layers. The pre-defined symbols and styles are available in the vector directory.

3.1. Importing custom symbols

1. Select the Road layer and right-click on the layer and select Properties.

  1. In the Style tab, click the Symbol.
_images/properties_style_tab.png

3. Click the Style manager.... Within this window, you can create new symbols or import/export existing symbols. Select the Line tab and click Share button.

_images/style_manager.png

4. Click the Import... button, open your vector directory and select custom_symbols.xml. Click Open.

_images/select_custom_symbols.png

5. In the Styles import/export window, click Select all –> Import.

_images/style_import_export.png

6. Your symbols will include more line styles. Click Close to end the import process.

_images/style_import_export_2.png

3.2. Using custom styles

1. Still within the Style tab of the Road layer, click Load Style .... Open your vector directory and select road_style.qml. Click Open.

_images/select_custom_style.png

2. The Road layer is now styled according to different road types. This custom style also uses the scale-dependent rendering. Click OK.

_images/roads_style.png

Tip

Scale dependent rendering allows you to set what features can be viewed at certain scale. This allows you to minimize “map clutter”. For example, in the Roads layer, we set the scale for minor roads (road, small road) to appear only on larger scales over the other road types.

3. Zoom in and out of the Map View to see the scale-dependent rendering in action.

_images/roads_style_view.png

4. A custom style is also available for the Landuse layer in the vector directory. Use the file landuse.qml.

5. Create custom styles for the POIs and Buildings layer.