[mapserver-users] Auto- classify by attribute value

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Thu Nov 18 10:33:54 PST 2010


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: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Simone Frigerio
Sent: Thursday, November 18, 2010 10:10 AM
To: mapserver-users at lists.osgeo.org
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:image001.gif at 01CB871C.B58B9950]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101118/8c9caffb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 566 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101118/8c9caffb/attachment.gif>


More information about the MapServer-users mailing list