[mapserver-users] Text transformation in MapServer expressions

Andy Colson andy at squeakycode.net
Wed Dec 16 12:21:27 EST 2009


On 12/16/2009 11:17 AM, Timbonicus Hansen wrote:
> I'm using a PostGIS database as the DATA source for a mapfile layer and
> rendering dynamic labels using MapServer expressions:
> TEXT ([columnName])
>
> I'd like the label to be uppercase, is there any way to transform the
> column text using MapServer expressions, or to trick MapServer into
> selecting the column with UPPER(columnName)? I'm fearful that this might
> mean reworking how the whole process works and not using a simple
> mapfile approach any more.
>
> - Tim
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

Yea, in your layer, use a DATA line like:

DATA "the_geom FROM (select gid, the_geom, upper(columnName) as 
columnName from table) as subquery using unique gid using srid=3417"

-Andy


More information about the mapserver-users mailing list