Hey Justin,

Thanks for the reply. Do functions work for filter only or they can be used to 
transform geometries too like in LineSymbolizer>Geometry  ?

Btw, it's definitively something to look for, I'll give a try when I'll have 
time, may be next week.

Cheers,

--
Jérémy Hanoun

De : Justin Deoliveira [mailto:[email protected]]
Envoyé : Thursday, November 25, 2010 4:34 PM
À : Jeremy HANOUN
Cc : Andrea Aime; [email protected]
Objet : *****SPAM***** Re: [Geoserver-users] How to add a function

Chiming in late... another way to add a simple filter function is the python 
community module.

http://docs.geoserver.org/latest/en/user/community/python/hooks.html#filter

Only available on trunk, and probably a bit unstable at this point but 
something to look for in the future. Or now for the brave :)

-Justin
On Tue, Nov 23, 2010 at 6:32 AM, Jeremy HANOUN 
<[email protected]<mailto:[email protected]>> wrote:
-----Message d'origine-----
De : [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>] De la part de 
Andrea Aime
Envoyé : Tuesday, November 23, 2010 2:23 PM
À : Jeremy HANOUN
Cc : 
[email protected]<mailto:[email protected]>
Objet : Re: [Geoserver-users] How to add a function

On Tue, Nov 23, 2010 at 2:08 PM, Jeremy HANOUN
<[email protected]<mailto:[email protected]>> wrote:
> -----Message d'origine-----
> De : [email protected]<mailto:[email protected]> 
> [mailto:[email protected]<mailto:[email protected]>] De la part de 
> Andrea Aime
> Envoyé : Tuesday, November 23, 2010 10:57 AM
> À : Jeremy HANOUN
> Cc : 
> [email protected]<mailto:[email protected]>
> Objet : Re: [Geoserver-users] How to add a function
>
> On Tue, Nov 23, 2010 at 8:56 AM, Jeremy HANOUN
> <[email protected]<mailto:[email protected]>> wrote:
>> Guys,
>>
>>
>>
>> I may need your help on the following point.
>>
>>
>>
>> I need to add a function to apply on Geometry and wanted to know if this is
>> doable as a plugin.
>
> It is
>
>> If so, I'll be very pleased to have some information on how to do that.
>
> We don't have a guide but adding a function is easy enough that you can just
> see how it's done and replicate.
>
> Look at the GeoTools main module:
> http://svn.osgeo.org/geotools/trunk/modules/library/main/src/
> this is where most of the function code is:
> http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/java/org/geotools/filter/function/
> this is a simple date formatting function:
> http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_dateFormat.java
>
> To have them plug into GeoTools/GeoServer you also need to add a file
> in META-INF declaring the existance of the function,
> like this one:
> http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/resources/META-INF/services/org.opengis.filter.expression.Function
>
> Hi Andrea,
>
> Thanks for the answer.
>
> I think that i've missed something...
> I made a new project with the code for a class named FilterFunction_padding 
> that extends FunctionExpressionImpl. The aim is to transform some geometries 
> a little.
> My tree looks like :
> /src
>    /perso
>        /plugin
>            /filter
>                /function
>                    FilterFunction_padding.java
>    /META-INF
>        org.opengis.filter.expression.Function

Should have been /META-INF/services/org.opengis.filter.expression.Function

Look at the location of the geotools file:

http://svn.osgeo.org/geotools/trunk/modules/library/main/src/main/resources/META-INF/services/org.opengis.filter.expression.Function
Thanks again Andrea,

It worked, I sometime have my head in the clouds :)

I'll tell you more soon about this function (when I'll have remove the bugs), I 
think this one could be helpful sometime and then I'll ask more questions on 
how to contribute to those projects (geotools and geoserver).

Btw I finished the "parametric" functionality for the Env_Function.

Cheers,

--
Jeremy Hanoun



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to