You could use attribute binding so you could attach another column like so:

Column1 - Column2 - Column3 -  Combi -      Color
0                    0                0                    0_0_0    #ff0000
1                    0                0                    1_0_1    #00ff00
0                    0                1                    0_1_0    #00ffff

Basically you'd assign color ahead of time based on the values of columns 1-3. 
Wouldn't need the Combi attribute then.

Your class would look like:

CLASS
      STYLE
        COLOR [Color]
        OUTLINECOLOR 0 0 0
      END
 END

Downside is that you can't generate a legend since everything is dynamic, but 
if you can live without that this approach would work.

Steve


From: [email protected] 
[mailto:[email protected]] On Behalf Of Simone Frigerio
Sent: Thursday, November 18, 2010 10:10 AM
To: [email protected]
Subject: [mapserver-users] Auto- classify by attribute value

Hi,
I have a vector shp with almost 8000 records.
Example of table:
Column1 - Column2 - Column3 -  Combi -
0                    0                0                    0_0_0
1                    0                0                    1_0_1
0                    0                1                    0_1_0
....

There are 260 combination in attribute value Combi. If I fix a CLASS for one 
like:
...
CLASS
      EXPRESSION "0_0_0"
      STYLE
        COLOR 25 255 255
        OUTLINECOLOR 0 0 0
      END
 END
....

 can I generate an automatic classification for all the 259 other classes?
Thanks.

Simone
--
[cid:[email protected]]

<<inline: image001.gif>>

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

Reply via email to