Hi Michael, I setup this to work when i pack my application in jar. However is there any way to use VarLookupFunction and make SLD file to find VarLookupFunction when there is no jar. E.g. i develop application in Eclipse IDE and it is sometimes time consuming to build application every time with Ant and then run jar. I tried to run main method from my application in Eclipse with "Run as Java application" option but i got error that VarLookupFunction cannot be find. Any idea?
Best regards 2009/12/5 mbedward [via OSGeo.org] <[email protected]<ml-node%[email protected]> > > Hi Nenad, > > It doesn't matter where the class resides (ie. which package / jar) > and you don't need to create an instance in your code. That will be > done for you by the filter factory. > > You tell GeoTools how to find your function via an 'spi' file. For > example, if you have the function in the same jar as your app add a > file to project's META-INF/services folder called > org.opengis.filter.expression.Function (the base class for SLD filter > functions). In this file you add the fully qualified name of the > function: e.g. org.foo.michael.hacks.VarLookupFunction. If you have > more than one function you put each one on a separate line. > > Before trying a complicated SLD document you might like to test that > GeoTools can find your function at runtime like this... > > FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null); > FunctionName fname = ff.functionName("varlookup", 1); > if (fname != null) { > System.out.println("Found " + fname.toString()); > } else { > System.out.println("Function not found"); > } > > Hope this helps. > > Michael > > ------------------------------------------------------------------------------ > > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Geotools-gt2-users mailing list > [hidden > email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4116612&i=0> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > ------------------------------ > View message @ > http://n2.nabble.com/GeoTools-SLD-issue-tp4093720p4116612.html > To unsubscribe from Re: GeoTools-SLD issue [SEC=Unclassified], click here< > (link removed) >. > > > -- View this message in context: http://n2.nabble.com/GeoTools-SLD-issue-tp4093720p4183802.html Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
