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

Steve Lime steve.lime@dnr.state.mn.us
Wed, 11 Feb 2004 15:16:18 -0600


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@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@lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users