[mapserver-dev] Possible BUG: MapServer WMS SLD with ExternalGraphic not working using trunk codebase

Yewondwossen Assefa yassefa at dmsolutions.ca
Tue May 24 10:19:44 EDT 2011


Hi,
...
  SYMBOL "http://demo.mapserver.org/ogc-demos/etc/images/target-1.gif" 
should be valid and the would in effect download your symbol and use it 
for the fill.

Here is a simple SLD I am using to do local tests and does seem to give 
expected result, Can you also try it?

<StyledLayerDescriptor 
version="1.0.0"><NamedLayer><Name>province</Name><UserStyle><Title>xxx</Title><FeatureTypeStyle><Rule><PolygonSymbolizer><Geometry><PropertyName>the_area</PropertyName></Geometry><Fill><CssParameter 
name="fill">#ff0000</CssParameter><GraphicFill><Graphic><ExternalGraphic><OnlineResource 
xlink:type="simple" 
xlink:href="http://demo.mapserver.org/ogc-demos/etc/images/target-1.gif"/><Format>GIF</Format></ExternalGraphic><Size>10.0</Size></Graphic></GraphicFill></Fill></PolygonSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>


Looking at the map file generated, I see a second style that seems to 
indicate a "stroke" element was given in the SLD to create an outline on 
the polygon. I tried to do the same and that gave me an issue where the 
2nd style "hiding" the first style with what seems to be a white fill. I 
have raised this issue in http://trac.osgeo.org/mapserver/ticket/3891 
and when fixed the map file given in your example should draw expected 
results.

best regards,



On 23/05/2011 12:02 PM, Debasish Sahu wrote:
> Hi,
>
> When I try to render a Polygon shapefile with a SLD file using the 
> ExternalGraphic , the mapserver crashes. After investigating the cause 
> by putting the DEBUG in map file and
> analyzing the temporary map file that is created , it seems the SYMBOL 
> , TYPE Pixmap tags are not getting created . Only the Symbol tag in 
> the Layer  is present.
> The image file gets downloaded into the temp dir.
>
> Can someone please confirm it is a bug with the current trunk codebase ?
>
> LAYER
>     DATA "states"
>     METADATA
>       "wms_srs"    "EPSG:4326"
>       "wms_title"    "states"
>     END # METADATA
>     NAME "states"
>     PROJECTION
>       "init=epsg:4326"
>     END # PROJECTION
>     STATUS ON
>     TILEITEM "location"
>     TYPE POLYGON
>     UNITS METERS
>     CLASS
>       NAME "states"
>       STYLE
>         ANGLE 0
>         COLOR 255 0 0
>         OFFSET 0 0
>         SIZE 10
>         SYMBOL 
> "http://demo.mapserver.org/ogc-demos/etc/images/target-1.gif"
>       END # STYLE
>       STYLE
>         ANGLE 0
>         OFFSET 0 0
>         OUTLINECOLOR 0 0 0
>       END # STYLE
>     END # CLASS
>   END # LAYER
>
>
> -- 
> Thanks and Warm Regards
> Debasish Sahu
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: yassefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110524/bf61d725/attachment.html


More information about the mapserver-dev mailing list