Polygon outline width
Gilles Bassière
gilles.bassiere at MAKINA-CORPUS.COM
Fri Jul 27 06:09:22 PDT 2007
Hi there,
I wonder whether it's possible to have no outline for a polygon.
My first attempt was to set the WIDTH property of the STYLE element to 0
in my MapFile but I got an error from MapServer, it seems to be an
invalid value.
As I might need to display the same data through GeoServer, I decided to
move all style information to a SLD. I wrote the following SLD :
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor
version="1.0.0"
xmlns="http://www.opengis.net/sld"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
>
<!-- WATER -->
<NamedLayer>
<Name>water</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Name>Water bodies</Name>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#99b3cc</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#0000FF</CssParameter>
<CssParameter name="stroke-width">0.0</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
My map is rendered without any error but there is still an outline. I
tried to set opacity to 0.0 but it's not supported by MapServer. I can
set the same color for stroke and fill but having a 1px outline means
that a very thin river is rendered with, at least, a 2 pixels width and
this is not really nice when viewing the map at higher scales...
If I remove the Stroke element Mapserver seems to set automatically a
1px outline using the fill color.
Does anyone know a workaround to get rid of polygon outlines ?
--
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75011 PARIS
http://www.makina-corpus.com
More information about the MapServer-users
mailing list