
GeoServer Beginner's Guide

The roads data set provided by Natural Earth has some attributes that can be used to classify roads. You may use the CLASS
field for thematic mapping, assigning a different symbol to each class:
Take the Roads.xml
file, make a copy to RoadsThematic.xml
, and then edit the new file in your text editor.
Go to line 9 and replace the text inside the Name
element with the following code snippet:
<Name>RoadsThematic</Name>
Go to line 11 and replace the text inside the Title
element with the following code snippet:
<Title>Geoserver Beginners Guide: Roads thematic map</Title>
The CLASS
field contains six different values: Interstate
, Federal
, State
, Other
, Closed
, and U/C
. We will re-use the symbol for the first value, Interstate
. You need to add a filter inside the rule, so that the symbol will be applied only to features with the Interstate
value in the CLASS
field. Add a Name
element inside the Rule
element and set it to Interstate
...
Change the font size
Change margin width
Change background colour