[mapserver-users] Change case of labels using a mapfile

Stephen Woodbridge woodbri at swoodbridge.com
Sat Mar 17 00:18:58 EDT 2012


On 3/16/2012 11:40 PM, Peter Girgis wrote:
> Dear users
> Our data contains fields that we would like to use as labels and the
> field data is all in upper case.
>
> I have been trying to find a way to use the mapfile to make the label
> appear in lower case.
>
> Does anyone have any thoughts?

You might be able to do this with ogr2ogr. You can use a sql statement 
to modify the the column you want. Here are some links that might help:

http://www.gdal.org/ogr2ogr.html
http://www.gdal.org/ogr/ogr_sql.html
http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet

You might try initcap(string), lower(string)

I have not tried this, but it is probably worth a try. Other options 
would be loading the file into postgis or spatialite and modifying it 
there then dumping it back out or writing a C, Perl, or Python script to 
modify the file.

-Steve W


More information about the mapserver-users mailing list