Matt Foster wrote:
> All,
>
> I'm trying to create a RasterSymbolizer from scratch (i.e. I don't 
> have a SLD to read).  I think I've figured it out down to the point 
> where I construct the ColorMapEntry objects.  ColorMapEntry requires 
> GeoAPI Expressions for the color and quantity, and I can't figure out 
> the right way to create the Expressions.
>
> Can anyone provide some tips or sample code?
User guide has a several examples of making expressions:
- 
http://docs.codehaus.org/display/GEOTDOC/Filter+Interfaces#FilterInterfaces-Expressions
- http://docs.codehaus.org/display/GEOTDOC/01+CQL+Examples

FilterFactory ff = CommonFactoryFinder.getFilterFactory( 
GeoTools.getDefaultHints );

Expression expr1 = ff.property( "attName");
Expression expr2 = ff.literal( 24 );
Expression expr3 = ff.literal( "hello world" );



Or using CQL:

Expression expr1 = CQL.toExpression("attName");

Expression expr2 = CQL.toExpression("34");

Expression expr4 = CQL.toExpression("'hello world'");





-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to