Hi Michael, hi everyone,

Here is how to use the NumberFormatFunction.

1) First, you have to register it so the factory can find it dynamically.

To do so, you have to create a META-INF/services folder in your jar file and put in it a simple text file called "org.opengis.filter.expression". You have to use this file name because the NumberFormatFunction implements that interface and this is the way for the factory to find it (I guess).

In the file, there is just one line of text indicating where the function is : org.my.package.NumberFormatFunction. Do not forget that the META-INF/services directory should be in the classpath when you run your application, otherwise, it will fail loading the function.

2) Then, you have to create your style (sample code attached to this mail). I only tryed it programmatically, I did'nt test it in a SLD.

Attachment: sample.java
Description: Binary data




Cheers
Ben

Le 4 mars 09 à 06:31, Michael Bedward a écrit :

Hi Ben,

Many thanks for posting your code.  I've just been studying it.  If
it's not too much trouble could you post a little snippet sometime
showing how you would use this programmatically please ?  No hurry.

cheers
Michael




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to