Hajo Kliemeck ha scritto:
> Hi Andrea,
> 
> i just want to associate numbers(sales volume) that are stored in a
> database to polygons (in that case the polygons are the features which
> are requested). afterwards i want to fill these polygons with the help
> of a color table and sld rules. e.g.
> 
> dynamic-number-property lower/equal 1000 -> fill color = #fffdd7
> dynamic-number-property lower/equal 2000 -> fill color = #fce8a9
> dynamic-number-property lower/equal 3000 -> fill color = #fbe06d
> dynamic-number-property lower/equal 4000 -> fill color = #fac926
> dynamic-number-property higher 4000 -> fill color = #f6a62d
> ...
> 
> the problem is, that the properties are static. and THATS my problem!
> i think that should be clear enough, right?

Nope. I don't see why you cannot just use various rules in SLD.
I guess it's because the logic to assign the dynamic-number-property
is complex.
In that case your best bet is probably to code up a filter function,
it takes the full feature as a parameter can be used directly
as the source of the color.
We don't have a programming guide for that, but have a look
at this one and try to replicate:
http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_numberFormat.java
And then you have to also register it in a file with the same name
and position as this one (but inside your jar):
http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/resources/META-INF/services/org.opengis.filter.expression.Function

I really hope soon we'll be able to offer people the ability to
build such simple plugins with a scripting language leveraging
Geoscript (http://geoscript.org)

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to