Time for action – classifying roads
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 toRoadsThematic.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
, andU/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 theInterstate
value in theCLASS
field. Add aName
element inside theRule
element and set it toInterstate
...