Theme Precedence
The order in which sub themes appear in the Sub Theme Manager Pane of the Layer Theme Editor is extremely important as it determines the order in which they are applied to the Geoplan.
The base or default theme is applied first and later themes may override earlier themes if they are applied to the same properties, over the same zoom/scale range. Properties are the object type-specific attributes (such as symbol, symbol colour, line style, line width, etc...) available to pick from in the Properties section of the Sub Theme Editor Pane. The details of the selected properties are shown in the Ranged Themes grid of the Layer Theme Editor.
Show me
The toolbar Move Up ( ) and Move Down ( ) buttons of the Sub Theme Manager Pane should be used to respectively promote or denote Sub Themes.
Tip
Disabled themes are themes that are not displayed on the GeoPlan Window. Such themes are not subject to theme precedence as they are hidden. To enable a hidden theme, select it in the Sub Theme Manager Pane and click the Enable/Disable button () on the toolbar. Once enabled, a theme will follow the theme precedence.rules described above.
All themes have zoom levels. This means that different themes can be set up for the same layer but that they may be applied at different zoom/scale levels.
Tip
Zoom or scale levels are available to configure in the Visible Range section of the Layer Theme Editor.
Click on the Example button below to reveal an example illustrating theme precedence.
Properties or attributes override using a process called cascading styles. This process specifies a priority scheme determining which style applies if more than one style has been defined for a particular property. The rule is that properties specified for the topmost sub-theme take precedence.
In other words, sub- themes applied early (sub-themes listed towards the bottom of the list in the Sub Theme Manager Pane) will be overridden by sub-themes applied later (located higher up the list in the Sub Theme Manager) for properties specified over the same zoom or scale range.
We will assume that the sub-themes are applied over the same zoom /scale range for the purpose of this example.
If we consider the example of 2 pipe sub-themes for system type and pipe material, for which attributes or properties are shown in the screenshot below:
For better clarity, the properties have been summarised in the table below:
Sub-Theme
|
Symbol
|
Line Colour
|
Line Style
|
Line Visibility
|
Line Width
|
system type |
not set
|
F (foul) - blue
#NOT - white
|
not set
|
not set
|
3
3
|
pipe material |
not set
|
PVC - red
ST - green
|
dotted line
dotted line
|
not set
|
2
2
|
base theme
(default theme)
|
none
|
Dark blue
|
not set
|
100%
|
2
|
system type sub-theme takes precedence for the line colour and line width attributes. As no line style has been configured for system type, the next sub-theme down that has settings for this property takes precedence, which is pipe material. This means that the line style will be dotted on the GeoPlan. Similarly, as neither system type, nor pipe material have had the symbol and the line visibility properties specified, the values that will prevail are the ones of the next theme down, which is the base theme in our case (none and 100% respectively).
Now, if we look at the system type and pipe material distinction, the current setup means that all pipes of system type foul will be displayed in thick dotted blue lines, regardless of the material they are made of whilst pipes of any other system type will be shown in thick dotted white lines, also regardless of their material. This shows that the current pipe material sub-theme is not being effective at all and perfectly illustrates the property override mechanism.
One of the following suggestions should be considered:
- Use a property in the pipe material theme that is not being set for the system type sub-theme to help distinguish between pipe materials, or
- Set the line style property to a different value (dashed or dash-dot) for one of the pipe materials in the pipe material theme.
- Alternatively, do not set the line width property in the system type sub-theme (untick Line Width in the Properties section for this sub-theme) and set this property in the pipe material theme by entering a different value for one of the materials.
- Distinguish between pipe materials using the line colour property in the pipe material sub-theme and remove this property in the system type sub-theme so there is no override. Line width or line style could then be used in the system type sub-theme to show the system type on the GeoPlan.
The image below illustrates how the cascading styles work if we over-simplify our example to the extreme. If we consider that each sub-theme is a transparent sheet of paper with properties on it and if we look at the superimposition of themes from the top, it can be seen that the resulting theme will have the line width and colour attributes of sub-theme 2 and the line style of stub-theme 1. Sub-theme 2 has no line style property set, therefore it is the next "visible" configuration of the line style attribute that will take precedence.