They are yet to be made, but should not be too difficult to make. The majority of the Functions are at: http://svn.geotools.org/geotools/branches/2.2.x/module/main/src/org/geotools/filter/function/
You can write one by hand, http://svn.geotools.org/geotools/branches/2.2.x/module/main/src/org/geotools/filter/MinFunction.java is a good example of one written by hand. Or you can figure out our auto-generating function writer, I think it's pretty straightforward. From Dave Blasby:
***
If you go into spike/dblasby/FilterFunctionWriter, you'll see three
java files -
a) StaticGeometry.java (this is where the functions are picked up from)
b) MakeFunctionClases.java (this creates all the actual code)
c) MakeServicesInfo.java (this creates the text to copy-and-paste into
the META-INF file)
All the code in the scripts is extreamly simple, so it shouldnt take you
more than 5 minutes to figure out whats going on. Feel free to "fix it
up" since I havent had any time (or need) to do anything to it.
***
So you can poke around there, I think you just need to add something to the bottom of the StaticGeometry to do the trig functions (would be nice to get the whole bunch of Java Math functions, if you've got time). Then you need to generate the text for the META-INF file, so that it can plug-in to GeoServer.
We would happily include your work in GeoTools/GeoServer, we just haven't gotten around to trig functions yet.
best regards,
Chris
Kasper H Kaergaard wrote:
Hi All..
In the OGC filter specifications I came across this example:
<Filter>
<PropertyIsEqualTo>
<Function name="SIN">
<PropertyName>DISPERSION_ANGLE</PropertyName>
</Function>
<Literal>1</Literal>
</PropertyIsEqualTo>
</Filter>
But I have not been able to find a reference to any trigonometric expression functions in geotools or geoserver..
What I need is really to be able to calculate the angle and magnitude of a vector, in order to show the vector as an arrow on a map. So I need a function expression for the two java functions Math.atan2() and Math.sqrt(). Have I just not found them or are they yet to be made? If so how can I make them?
I should say that I'm using Geotools to create shapefiles and sld files so I can show my modelling results on a map with geoserver..
Thanks... Kasper Kaergaard
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org