[Mapserver-users] concatenate 2 or more fields in shape file to display in MS as label

Stephen Clark stephen.clark at focus.ca
Wed Feb 11 13:56:12 PST 2004


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




More information about the MapServer-users mailing list