[Mapserver-users] classification question

Till Adams adams at terrestris.de
Wed Oct 22 02:55:50 PDT 2003


Dear Bart,

never tried soemthing like that, but I guess you may use something like 
this:

CLASS
  EXPRESSION ([zone1] > [zone2] > and [zone1] > [zone3] and ...)
  COLOR x x x
END # CLASS

CLASS
  EXPRESSION ([zone2] > [zone1] > and [zone2] > [zone3] and ...)
  COLOR x x x
END # CLASS

Let me know, if this worked :-)

Easier would be to insert a new column in your table, where the the 
[zone_nr] is in according to the highest value of each [zone] in a line. 
Looks like:
[NewColumn]
zone1
zone3
zone4
zone1
...

Then use

CLASS
  EXPRESSION /^zone1/
  COLOR x x x
END # CLASS
...

;-)
Till

bartvde at xs4all.nl schrieb:
> Hi list,
> 
> is it possible to perform the following classification in Mapserver?
> 
> I have an attribute table for polygons like this (for each zone the
> percentage is given):
> 
> polygon zone1 zone2 zone3 zone4 .. zoneN
> 1       60    20    20    0
> 2       20    60    10    10
> 3       40    40    20    0
> 
> zone1: blue
> zone2: red
> zone3: green
> zone4: yellow
> 
> In this situation I would want each polygon to have the color of the zone
> with the highest percentage, if there is one zone that has a percentage >=
> 60%.
> 
> If none of the zones have a percentage >= 60%, the polygon will be
> depicted with one color, and the other (second dominant zone) color as the
> color for pattern hatching.
> 
> Thanks in advance for the info.
> 
> Best regards,
> Bart
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 


-- 

***** Besuchen Sie uns auf der acqua alta *****
*****   vom 24.-27. November in München   *****

-----

Dipl. Geogr. Till Adams
terrestris, Paulsen&Adams GbR
Siemensstr. 8 * 53121 Bonn
Tel.: 0228 962 899 52 * Fax.: 0228 962 899 57
info at terrestris.de * www.terrestris.de





More information about the MapServer-users mailing list