flaw in SLD label implementation

Eijnden, Bart van den (AGI) b.vdeijnden at AGI.RWS.MINVENW.NL
Thu Aug 10 02:19:47 EDT 2006


Hi list,

I am trying to get Mapserver (version 4.8.4) to display labels for a certain attribute column. This works fine if I use the non-conformant OGC request (only part of my SLD):

<TextSymbolizer><Label>MY_COLUMN</Label>

According to the OGC SLD spec Mapserver should just label with MY_COLUMN as a static string.

But it does not work if I use it the way the example in the SLD spec indicates (using ogc:PropertyName):

<TextSymbolizer><Label><ogc:PropertyName>MY_COLUMN</ogc:PropertyName></Label>

I get:
[Thu Aug 10 08:06:30 2006] [error] [client 145.50.39.34] Thu Aug 10 08:06:30 2006 - msDBFGetItemIndex(): DBASE file error. Item 'PropertyName' not found.

Example from SLD spec:
<TextSymbolizer>
<Geometry>
<ogc:PropertyName>locatedAt</ogc:PropertyName>
</Geometry>
<Label>
<ogc:PropertyName>hospitalName</ogc:PropertyName>
</Label>

Why is this important? So that you can label using attribute values and static strings combined, like:
<Label>This is city "<ogc:PropertyName>NAME</ogc:PropertyName>"
of state <ogc:PropertyName>STATE</ogc:PropertyName></Label>

Can this be fixed?

Best regards, 
Bart van den Eijnden
================================= 

drs. A.J. van den Eijnden
adviseur 
Productteam Applicaties Geo-Informatie
Rijkswaterstaat Adviesdienst Geo-informatie en ICT 
Postbus 5023, 2600 GA Delft 
Derde Werelddreef 1, 2622 HA Delft 
Telefoon: (015) 275 75 75 
E-mail b.vdeijnden at agi.rws.minvenw.nl
================================= 


Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
informeren. Wij adviseren u om bij twijfel over de juistheid of de
volledigheid van de mail contact met afzender op te nemen.

This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************



More information about the mapserver-users mailing list