[mapserver-users] MapServer and SLD/SE

Yewondwossen Assefa yassefa at dmsolutions.ca
Tue Aug 11 17:29:55 EDT 2009


Alexander Reichelt wrote:
> Hi list,
> 
> I've got some issues with the MapServer and SLD/SE 1.1.0:
> 1. I can't rotate my labels. They are displaying the string value I'm 
> reading out of a PostGIS table correctly. But the real value standing 
> for an angle they doesn't seem to use. My TextSymbolizer looks like this:
> 
> <se:TextSymbolizer>
>    <se:Label>content</se:Label>
>    <se:Font>
>        <se:SvgParameter name="font-family">arialbold</se:SvgParameter>
>        <se:SvgParameter name="font-size">10.00</se:SvgParameter>
>    </se:Font>
>    <se:LabelPlacement>
>        <se:PointPlacement>
>            <se:AnchorPoint>
>                <se:AnchorPointX>0.5</se:AnchorPointX>
>                <se:AnchorPointY>0.5</se:AnchorPointY>
>            </se:AnchorPoint>
>            <se:Rotation>
>                <ogc:PropertyName>angle</ogc:PropertyName>
>            </se:Rotation>
>        </se:PointPlacement>
>    </se:LabelPlacement>
>    <se:Fill>
>        <se:SvgParameter name="fill">#000000</se:SvgParameter>
>    </se:Fill>
> </se:TextSymbolizer>
> 
> When I type in a fix value like 220.5 then it works and all labes are 
> displayed with this angle. The curious thing is, when I exchanged the 
> content item with the angle item then the angle item was displayed, so 
> the MapServer does have access to the angle item. Is it possible that 
> there's a typecast which casts the real value of the angle into a 
> string? How can I check this? I've tried to change the XML elements but 
> nothing helped me so far.
> 
  Rotation is defined as a number in the SLD specs and that is what is 
currently expected when parsing the SLD in MapServer.
Using attributes from your data for the rotation/angle parameter (or for 
that matter for all parameters that have attribute binding capabilities 
in Mapserver), could possibly be supported (at least in cases where the 
the value in the sld is a string and the expected value is numeric). You 
can possibly enter an enhancement bug on this and start a discussion in 
that bug.

> 2.  MapServer doesn't support TrueType symbols for PointSymbolizers, is 
> this correct? The website states that MapServer supports Well-known 
> names. I've tried to point on a .ttf file and use MarkIndex to get out a 
> symbol but I had no success.
> 
  That is correct, only Well-known symbols as well as well as gif/png 
symbols are supported.  I have entered a enhancement bug on it [1]

[1]: http://trac.osgeo.org/mapserver/ticket/3084

best regards

> Thank you in advance
> Alex
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


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

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

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



More information about the mapserver-users mailing list