Opened 18 years ago
Closed 18 years ago
#1887 closed defect (fixed)
PointSymbolizer does not use outline color correctly
Reported by: | Owned by: | assefa | |
---|---|---|---|
Priority: | high | Milestone: | 4.10 release |
Component: | WMS Server | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: |
Description
There is a bug in mapogcsld.c. When using the following SLD: <sld:PointSymbolizer> <sld:Graphic> <sld:Mark> <sld:WellKnownName>circle</sld:WellKnownName> <sld:Fill> <sld:CssParameter name="fill">#FF0000</sld:CssParameter> <sld:CssParameter name="fill-opacity">1.0</sld:CssParameter> </sld:Fill> <sld:Stroke> <sld:CssParameter name="stroke">#000000</sld:CssParameter> <sld:CssParameter name="stroke-width">1</sld:CssParameter> </sld:Stroke> </sld:Mark> <sld:Size>13</sld:Size> <sld:Rotation>0</sld:Rotation> </sld:Graphic> </sld:PointSymbolizer> The point ends up being coloured using the stroke color. Whereas one would expect a stroke of 1 pixel in black, and the symbol filled in red. This is caused by the following fragment in mapogc.sld, also for point layers it just needs to set the outlinecolor and not the color, I have patched and tested this in my local copy: old code: if (psColor) { nLength = strlen(psColor); if (nLength == 7 && psColor[0] == '#') { /* we should set the color for point layers since the */ /* outline color is not used when */ /* rendering symbols */ if (bPointLayer) msSLDSetColorObject(psColor, &psStyle->color); else msSLDSetColorObject(psColor, &psStyle->outlinecolor); } } new code: if (psColor) { nLength = strlen(psColor); if (nLength == 7 && psColor[0] == '#') { msSLDSetColorObject(psColor, &psStyle->outlinecolor); } }
Change History (3)
comment:2 by , 18 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Dunno about the fix for 4.10. Assigned to Assefa to decide since SLD is his territory.
Note:
See TracTickets
for help on using tickets.