I'm new with GeoServer.
I'm trying to style a Geoserver layer. The features come from a PostGIS table.
The feature are all lines. I'd like to style them based on attributes (of the table). I can do that. I created rules that say "if myfield = value1 draw a red line, if myfield = value2 draw a blue line, …" and so on.
I'd like to write a default style for the line: "if none of the above rules is true than draw the line yellow".
I didn't find in the Geoserver SLD documentation anything to accomplish that. Or my way of reasoning is different from that of SLD.
In the docs there's a UserStyle is Default property but I think it's not what I'm looking for.
I Googled too to no avail.
Any suggestion?
Best Answer
Yes, you can try styling your data with QGIS. But if you want to create a rule based sld or an sld with more options (fill opacity, rules, outline etc) I recommend you to use uDig. With you uDig you can style your data with many options and then export slds that will work 99,9% when uploaded on geoserver.
More about sld editor and uDig here.