[Geoserver-users] wide translucent lines are dark at overlaps - SLD, linesymbolizer, opacity

All,

I want to draw wide translucent lines.
My problem is that overlapping "areas" are darker than non-overlapping
areas.
This includes the overlap of linecaps as well as the overlap at
intersections.
For example:
http://www.nabble.com/file/p16988219/geoserver_nabble_sld_line_opacity.png

Here is a snippet from the SLD:
            <sld:FeatureTypeStyle>
                <sld:Name>singleLineZoomLevel_in_9_8_7</sld:Name>
                <sld:Title>title</sld:Title>
                <sld:Abstract>abstract</sld:Abstract>
                <sld:FeatureTypeName>v_roads_3</sld:FeatureTypeName>
               
<sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
                <sld:Rule>
                    <sld:Name>name</sld:Name>
                    <sld:Title>title</sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
                    <sld:MinScaleDenominator>17000</sld:MinScaleDenominator>
                   
<sld:MaxScaleDenominator>136000</sld:MaxScaleDenominator>
                    <sld:LineSymbolizer>
                        <sld:Stroke>
                            <sld:CssParameter name="stroke">
                                <ogc:Literal>#F2BF24</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-linecap">
                                <ogc:Literal>round</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-linejoin">
                                <ogc:Literal>round</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-opacity">
                                <ogc:Literal>0.50</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-width">
                                <ogc:Literal>8.0</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-dashoffset">
                                <ogc:Literal>0.0</ogc:Literal>
                            </sld:CssParameter>
                        </sld:Stroke>
                    </sld:LineSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>

No sign of this in previous postings.
I have fiddled with stroke-linecap and stroke-linejoin with no luck.

Thanks,
Paul

--
View this message in context: http://www.nabble.com/wide-translucent-lines-are-dark-at-overlaps---SLD%2C-linesymbolizer%2C-opacity-tp16988219p16988219.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Paul McCullough ha scritto:

All,

I want to draw wide translucent lines.
My problem is that overlapping "areas" are darker than non-overlapping
areas.
This includes the overlap of linecaps as well as the overlap at
intersections.
For example:
http://www.nabble.com/file/p16988219/geoserver_nabble_sld_line_opacity.png

Here is a snippet from the SLD:
            <sld:FeatureTypeStyle>
                <sld:Name>singleLineZoomLevel_in_9_8_7</sld:Name>
                <sld:Title>title</sld:Title>
                <sld:Abstract>abstract</sld:Abstract>
                <sld:FeatureTypeName>v_roads_3</sld:FeatureTypeName>
               <sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
                <sld:Rule>
                    <sld:Name>name</sld:Name>
                    <sld:Title>title</sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
                    <sld:MinScaleDenominator>17000</sld:MinScaleDenominator>
                   <sld:MaxScaleDenominator>136000</sld:MaxScaleDenominator>
                    <sld:LineSymbolizer>
                        <sld:Stroke>
                            <sld:CssParameter name="stroke">
                                <ogc:Literal>#F2BF24</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-linecap">
                                <ogc:Literal>round</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-linejoin">
                                <ogc:Literal>round</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-opacity">
                                <ogc:Literal>0.50</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-width">
                                <ogc:Literal>8.0</ogc:Literal>
                            </sld:CssParameter>
                            <sld:CssParameter name="stroke-dashoffset">
                                <ogc:Literal>0.0</ogc:Literal>
                            </sld:CssParameter>
                        </sld:Stroke>
                    </sld:LineSymbolizer>
                </sld:Rule>
            </sld:FeatureTypeStyle>

No sign of this in previous postings.
I have fiddled with stroke-linecap and stroke-linejoin with no luck.

I fear there is nothing we can do about that... it's just what happens
when you paint two times on an area with a traslucent paint. Try to
do that with any image editing tool, the more you draw with the
translucent brush, the more solid the color gets.

I'm pretty sure that's the SLD expected behaviour. Maybe java2d
has some compositing rules that would allow to get what you're
looking for, if so, a vendor parameter could be added to control
that on a per request basis.... that might require quite some work
thought.

Cheers
Andrea

Fair enough - we'll live with it.
Thanks for the speedy reply.

--
View this message in context: http://www.nabble.com/wide-translucent-lines-are-dark-at-overlaps---SLD%2C-linesymbolizer%2C-opacity-tp16988219p16988560.html
Sent from the GeoServer - User mailing list archive at Nabble.com.