Tag Info

New answers tagged

2

This is probably an artifact due to tiling. The layer preview map defaults to a single tile, but I'm guessing your openlayers map uses tiling. Geoserver insists on labeling every tile. GeoServer doesn't know that each request is for a tile in a larger map, so it treats a tile as a complete map and dutifully applies a label to it. So basically, if a road ...


1

Perhaps you meant to use the NamedLayer element, rather than UserLayer. e.g. <?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...


0

It seems as thought recode should do exactly what you want. You'll need two recode functions as you need to convert your color column into a stroke element and the line style column into a dash array. See the transforms tutorial for full syntax details.


1

Thanks to @Branco suggestion, I investigated qGIS and I used it's style editor to create my road style. What is interesting is that when I exported style to SLD it generated this PerpendicularOffset tag for LineSymbolizer ... I never knew that tag exists... and this is the solution <se:LineSymbolizer> <se:Stroke> ...


0

In general in SLD to draw two items for a feature you need two rules. This is complicated in TextSymbolizers as the label placement system tries hard to avoid overlapping labels (which is what most people want most of the time) as you have found out. The easiest fix for your problem is to manually turn label conflict resolution off using the following vendor ...


0

You could try styling it the way you like in qGIS and then exporting the SLD and using it in GeoServer. Check out this article and try it out since I find it much easier to use than styling in the SLD itself or through GeoServer's interface. http://www.camptocamp.com/actualite/qgis-and-geoserver-creating-styles/


0

This is an extension of the usual way of drawing cased roads, first draw a wide black line (say 5px) then draw a grey line (4px wide) and then a dashed white line (3px wide) and then a grey line (2px) wide. This will be quiet slow but GeoServer will try to cache as many of the features as it can so it shouldn't be too bad but don't turn this on a full map ...



Top 50 recent answers are included