On 16 February 2012 16:10, Rakshit Majithiya <[email protected]> wrote: > so, I found the StyleFunctionLab for 2.6.3 very useful guide. > Can I implement the same functionality in 8.0 ?? >
Yes you certainly could but it would require a little bit of work... - Make ColorLookupFunction into a separate (ie. non-nested) class. - Modify the class so that it takes the feature collection and expression as parameters rather than as args to the constructor. - Register it with GeoTools by putting its fully qualified name in the file: META-INF/services/org.opengis.filter.expression.Function (If you are using Maven, the META-INF should be placed in src/main/resources) Then in your own code you will be able to access the function via the FilterFactory2.function method. I don't have time to show you how to modify the class etc right now but if you look at this tutorial on functions it might help: http://docs.geotools.org/latest/userguide/tutorial/advanced/function.html Note that in the tutorial you create your own FunctionFactory as well as the custom Function class. In your case I don't think this is necessary. Sorry for the rushed reply. If I have more time in the next few days I'll post some example code but hopefully you'll beat me to it :) Michael ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
