[Mapserver-users] DBF Leading Spaces

Steve Lime steve.lime at dnr.state.mn.us
Mon Apr 28 08:44:04 PDT 2003


Hi Shannon. It's intentional, although it was implemented long ago
primarily to
trim trailing spaces rather than leading spaces. I think removing
leading spaces
could safely be disabled. The code is in mapdbf.c if you'd care to hack
at it 
yourself. I will make the change to the development version.

Steve

>>> "Shannon Scott" <sscott at gwi.net> 04/28/03 10:36AM >>>
Hello,
I have been in an effort to make some center justified text labels.
I could not find documentation describing mapfile keywords that could
achieve this,  and my posts to the list on the 'Center Justify' topic
were not responded to.

So we wrote a program that goes through a DBF column and adds spaces
and a "WRAP" character at the appropriate positions for the center
justified effect.

The problem is that sometimes to get center justification the first
word must have spaces added to the beginning of the word. 
For Example consider the words 'Center Justification'.
    Center
Justification
The word center has four spaces at the beginning.

It seems that spaces are trimmed from the beginning of a text field
when the DBF is read by MN MapServer.  Is this intentional?
I have opened the DBF in other apps ( MS Access ) and the spaces are
present.  
Is this a bug in MN MapServer?  
Any incite is greatly appreciated.
Thank You
Shannon






More information about the MapServer-users mailing list