[Mapserver-users] concatenate 2 or more fields in shapefile to display in MS as label
Stephen Clark
stephen.clark at focus.ca
Fri Feb 13 11:35:43 PST 2004
Steve and others,
I am able to get two or more fields concatenated as follows:
TEXT (TWP [TWP] RNG [RNG])
but would like the output to be displayed down the screen instead of across.
How would I insert a Newline Character in this text string?
thanks,
Stephen
----- Original Message -----
From: "Steve Lime" <steve.lime at dnr.state.mn.us>
To: <stephen.clark at focus.ca>; <mapserver-users at lists.gis.umn.edu>
Sent: Wednesday, February 11, 2004 1:16 PM
Subject: Re: [Mapserver-users] concatenate 2 or more fields in shapefile to
display in MS as label
> Use the TEXT option in the class object. You'd do something like:
>
> TEXT "TWP [TWP] RNG [RNG]"
>
> You could do the concatenation ahead of time in ArcView or any other
> software (e.g. perl with XBase.pm) that could manipulate dbase files.
>
> Steve
>
> >>> "Stephen Clark" <stephen.clark at focus.ca> 2/11/2004 3:56:12 PM >>>
> Hi all,
>
> I have two fields in a Shape file that I would like to Concatenate and
> display as a label in mapserver.
>
> For example:
>
> LAYER
> NAME township_range
> TYPE LINE
> STATUS OFF
> DATA "d:/shp/townships"
>
> LABELITEM "TWP"
> # and I want to concatenate
> # LABELITEM "RNG"
> # to the label
> CLASS
> COLOR 10 10 10
> LABEL
> MINFEATURESIZE 40
> MINDISTANCE 150
> POSITION AUTO
> COLOR 10 10 10
> FONT arial
> TYPE truetype
> SIZE 10
> FORCE TRUE
> END
> END
>
> END
>
> I would like the final string to be like "084 021" .
>
> OR a more general case
> 'TWP' + 'township value' + 'space' + 'RNG' + Range Value'
> like:
> "TWP 084 RNG 021"
>
> Has anyone tried this out?
>
> thanks
> Stephen
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list