Time for action – using hatching
Until now we have used standard SLD syntax; you may take the styles and use them on another map server and it will produce the same maps. But this book is focused on a specific map server and we can use a vendor option, a small trick that is only available on GeoServer, to create a symbol that resembles railroads:
Take the
Rivers.xml
file, make a copy toRailRoads.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:<Name>RailRoads</Name>
Go to line 11 and replace the text inside the
Title
element with the following:<Title>Geoserver Beginners Guide: RailRoads with hatching</Title>
Go to line 16 and change the color to black:
<CssParameter name="stroke">#000000</CssParameter>
Go to line 20 and after the end of the
Rule
element, add anotherRule
for aLineSymbolizer
element:<Rule> <LineSymbolizer> <Stroke>...