Hi Mark: With the changes in label styles in 6.0 you should be able to combine 
the layers, for example:

LAYER
  NAME 'major_roads'
  ...
  CLASS
     NAME 'Interstates'
     STYLE # orange lines with a brownish outline
        WIDTH 4 MAXWIDTH 8 MINWIDTH 4
        COLOR 242 191 36
        OUTLINECOLOR 187 176 157
        OUTLINEWIDTH 1
     END
     LABEL
       TYPE TRUETYPE
       SIZE 7
       ...
       STYLE
         SYMBOL 'interstate_shield.png'
       END
     END
  END
END

That should be all there is to it- all in one pass.

Steve

From: [email protected] 
[mailto:[email protected]] On Behalf Of Mark Volz
Sent: Tuesday, January 10, 2012 1:37 PM
To: [email protected]
Subject: [mapserver-users] performance question - labeling roads with shields

Hello,

On my Application I currently am using two layers to draw my roads.  The first 
one is a line layer that draws the road itself.  The second is a annotation 
layer that draws the labels and the road shields.  Both layers have the same 
source dataset.  My concern is that my application is taking a performance hit 
since the road file is being read twice.

If there is a performance hit by reading the same data file twice, is there a 
way combine the line layer and annotation layer into a single layer that has 
both the road symbology, and labels that have shields?


Layer Roads
...
DATA MyRoads
TYPE LINE
CLASS
                NAME 'State Highway'
                EXPRESSION "A20"
                STYLE
                        COLOR 0 0 0
                        SYMBOL 'plainline'
                        SIZE 5
                END #style
                STYLE
                        SYMBOL 'plainline'
                        SIZE 1
                        COLOR 255 0 0
                END #style
        END #class
...
END #LAYER
Layer RoadLabels
        ...
        Data MyRoads
        TYPE ANNOTATION
        CLASS
                TEXT ([ROADNUM])
                EXPRESSION 'A20'
                SYMBOL './symbols/STHWY.png'
                LABEL
                        type truetype  # AGG required
                        size 7 #for AGG
                        ANTIALIAS TRUE
                        FONT vera_sans  #for AGG
                        MINFEATURESIZE 25
                        MINDISTANCE 200
                        COLOR 254 254 254
                END #LABEL
        END #CLASS
END #Layers

Thank You


Mark Volz
GIS Specialist



_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to