On Fri, Jan 21, 2011 at 8:49 PM, Ian Turton <ijturton@anonymised.com> wrote:
I'm wondering how I go about adding a GeoTools process to GeoServer
with WPS? I found
http://www.mail-archive.com/geoserver-users@lists.sourceforge.net/msg02079.html
which seems to say I need to edit core WPS classes, is that correct?
Not really, not anymore in any case. There are various ways to add a process,
but let me show you the quickest one, which we'll add the process among
the "gs" ones.
1) Code your process using the annotations and making it implement
the marker interface GeoserverProcess. For example:
http://svn.codehaus.org/geoserver/trunk/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/gs/CollectGeometries.java
2) Declare the process in the Spring context, for example:
http://svn.codehaus.org/geoserver/trunk/src/extension/wps/wps-core/src/main/java/applicationContext.xml
see in particular:
<bean id="collectGeometriesProcess"
class="org.geoserver.wps.gs.CollectGeometries"/>
You can do that in your own module, provided you declare a dependency
to wps-core.
Ah, the annotations will eventually be moved back to GeoTools and thus change
package. Also the existing processes might change name, parameters and the like.
What we have today is mostly the result of my spare time coding (though lately
we started adding processes backed by real funding, yeah!), so interfaces and
class locations are still not definitive...
I think WPS will grow strongly over then next year, but the road may
be a little bumpy
Cheers
Andrea
--
Ing. Andrea Aime
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------