I think you will find three already defined; and at least one of them 
implemented in the render module.
Reni and I were looking at them last year.

stroke-width:
- categorize( attribute, 1, 5000, 2, 15000, 3, 40000, 4,750000, 5 );

fill-color:
- interpolation( attribute, 0.0, '#005500', 3300.0, 'AA1100', 5000.0, #FFFFFF, 
"linear", "color", )

Where:
- linear/cosine/cubic ar e valid interpolations
- and they indicate the interpolation method as numeric or color

From:
OpenGIS® Symbology Encoding Implementation Specification | OGC®

Jody

On 18/03/2010, at 10:36 PM, Michael Bedward wrote:

> Hi folks,
> 
> I'd like to add a filter function to generate colours from a colour
> ramp based on feature attribute values.
> 
> To give you the idea, there's a version of such a function in the
> examples, plus an app that uses it to display the countries shapefile
> with fill colour based on population values...
> http://svn.osgeo.org/geotools/trunk/demo/example/src/main/java/org/geotools/demo/filter/function/
> 
> The app shows the function used programmatically and also from the SLD
> file here...
> http://svn.osgeo.org/geotools/trunk/demo/example/src/main/resources/data/shapefiles/
> 
> I'd appreciate your thoughts on what the parameters for such a
> function should be to make it flexible enough to be useful without
> being cumbersome to apply, especially in a SLD doc.  Also, I suppose,
> your opinions on whether it's worth adding at all.
> 
> cheers
> Michael
> 
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to