[mapserver-users] how to define the CLASSITEM and EXPRESSION in this case?
Fawcett, David (MPCA)
david.fawcett at state.mn.us
Thu Sep 8 08:22:08 PDT 2011
Have you looked at this page in the documentation?
http://mapserver.org/mapfile/expressions.html#arithmetic-operations-and-functions-that-return-a-number
You should be able to do this. You wouldn't use a CLASSITEM, just an expression.
Create individual classes for green, yellow, and red.
The expression for green would be something like:
EXPRESSION ([PopulationOver65] / [PopulationTotal] * 100 < 10)
David.
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of jjwang
Sent: Thursday, September 08, 2011 12:47 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case?
I want to define classes according to the proportion between two attributes
of the feature.
How to do this?
For example: feature has two attributes 'PopulationOver65' and
'PopulationTotal'. They are both numbers.
I want the color of this feature:
green if PopulationOver65/PopulationTotal <10%,
yellow if 10% -30%,
red if 30%.
Anyway to do this?
JJ
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-define-the-CLASSITEM-and-EXPRESSION-in-this-case-tp6770598p6770598.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list