[Geoserver-users] Custom filter function ?

I'm a new user of GeoServer. I need to create a custom filter function, but
the information I have found seems to all be for GeoTools. Being a newbie,
it's not clear to me if this applies to GeoServer as well. If anyone can
point me to some clear instructions or tutorial no creating a custom filter
function for GeoServer it would be greatly appreciated.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-filter-function-tp5062121.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Tue, Jun 25, 2013 at 4:27 PM, brking <brking@anonymised.com> wrote:

I'm a new user of GeoServer. I need to create a custom filter function, but
the information I have found seems to all be for GeoTools. Being a newbie,
it's not clear to me if this applies to GeoServer as well. If anyone can
point me to some clear instructions or tutorial no creating a custom filter
function for GeoServer it would be greatly appreciated.

Just do it like GeoTools says then drop in the jar in WEB-INF, restart
the web container and the new filter function should be available to
GeoServer,
quick way to confirm is to see if it's being listed in the WFS capabilities
document

There are no GeoServer specific tutorials on how to do a custom filter
fuction...
well,unless there is anything from the new scripting modules, not sure,
cc'ing Justin,
he surely knows if there is something out there.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Great, so per one of your other posts on this, I do not need to create the
factory ?

http://osgeo-org.1560.x6.nabble.com/SLD-time-functions-td5042909.html

thanks

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-filter-function-tp5062121p5062134.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I'm sorry but I'm just not getting this. I created a new maven project, added
the Geotools references (9.3) and created a function class similar to this:

https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/filter/function/string/ConcatenateFunction.java

The code compiles fine. I then dropped the jar in a new META-INF folder
under the webapps/geoserver folder. It doesn't show up in any WFS
GetCapabilities calls for the sample layers.

- Does my jar need to go into a subfolder under META-INF ?
- There is a mention of a text file in the geotools factory tutorial that
goes under META-INF/services, but I don't see it. Does that need to be
created ?

Thanks

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-filter-function-tp5062121p5062170.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sorry it’s late but to answer the question about the scripting extension [1], it is possible to write a filter function using the extension, unfortunately its not documented yet :frowning:

There are a few examples in the tests, these in javascript.

https://github.com/geoserver/geoserver/tree/master/src/community/script/core/src/test/resources/org/geoserver/script/function

To install the scripts one has to copy them into <GEOSERVER_DATA_DIR>/script/function…

[1] http://docs.geoserver.org/stable/en/user/community/scripting/index.html

···

On Tue, Jun 25, 2013 at 3:33 PM, brking <brking@anonymised.com> wrote:

I’m sorry but I’m just not getting this. I created a new maven project, added
the Geotools references (9.3) and created a function class similar to this:

https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/filter/function/string/ConcatenateFunction.java

The code compiles fine. I then dropped the jar in a new META-INF folder
under the webapps/geoserver folder. It doesn’t show up in any WFS
GetCapabilities calls for the sample layers.

  • Does my jar need to go into a subfolder under META-INF ?
  • There is a mention of a text file in the geotools factory tutorial that
    goes under META-INF/services, but I don’t see it. Does that need to be
    created ?

Thanks


View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-filter-function-tp5062121p5062170.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


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

Thank you Justin and Andrea. I finally got a Java filter function working and
registered based on the GeoTools info. The javascript mechanism looks easier
if I can get it working.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Custom-filter-function-tp5062121p5062582.html
Sent from the GeoServer - User mailing list archive at Nabble.com.