Hi list !

Andrea, what you suggest is exactly what I would like to do.
Could you point me with tutorials to understand :
- how to use ogc namespace
- how to register a function in the GeoTools SPI

Thanks

Benoît

Le 22 janv. 09 à 09:43, Andrea Aime a écrit :

> There is no built-in way to do so, at least not for vector data,
> only the raster symbolizer has a ColorMap concept (which is in
> fact a way to declare a color ramp).
>
> Yet, not all hope is lost. The fill color can take pretty much
> any expression inside of it, so it can also take a filter
> function. Filter functions are pluggable, so you can write
> a custom one, register it in the GeoTools SPI (the plugin
> mechanism GeoTools and JAI use), and use it in your SLD.
> The result would look like:
>
> <CSSParameter name="fill">
>   <ogc:Function name="colorRamp">
>      <ogc:PropertyName>myAttribute</ogc:PropertyName>
>   </ogc:Function>
> </CSSParameter>
>
> or maybe you can add all params to make a color ramp
> explicit, such as the array of colors and values.
> Maybe something like:
>
> <CSSParameter name="fill">
>   <ogc:Function name="colorRamp">
>      <ogc:Literal>#FF0000,#00FF00,...</ogc:Literal>
>      <ogc:Literal>0,120,...</ogc:Literal>
>      <ogc:PropertyName>myAttribute</ogc:PropertyName>
>   </ogc:Function>
> </CSSParameter>
>
> That is, the first two arguments being two strings
> that you'll then parse into a list of colours and
> a list of values.
>
> Cheers
> Andrea
>
> -- 
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to