I have shapefiles that look like this like this:
                  R                G           B
             STATE1     STATE2   STATE3
AREA1   z                 n            a
AREA2   y                m            b
AREA3   x                p             c

The values of each column represents counts.
I assign a color to each column ( say R, G, B)
Then It is easy to create a style that says, show me all the areas which for 
which the value of STATE2 < 0
by using the filter rule


    Rule rule = sb.createRule(symb);

    PropertyIsGreaterThan gt = ff2.greater(ff2.property(“STATE2"), 
ff2.literal(0));

    rule.setFilter(gt);


and where symb is a polygon symbolizer (for example) with fill color G


But I want to be more generic than this. I want to say: show me all the areas 
for which the the state is < STATE3

The rule in that case I think would be:

       Or or = ff2.or(ff2.greater(ff2.property(“STATE2"), ff2.literal(0)), 
ff2.greater(ff2.property(“STATE1”), ff2.literal(0)); (I work backwards to find 
the highest non zero state).

But now I get confused with assigning the symbology. I want the fill color of 
the area to be that of the column (attribute) with the highest non failing 
filter condition.
How do I achieve this? Do I also associate a greater than filter with the 
symbology bit?

Thanx in advance
Gaby


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to