[Geoserver-users] Add a WPS process to GeoServer

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?

Thanks

--
Ian Turton

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

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

On Sat, Jan 22, 2011 at 1:13 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

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
Re: [Geoserver-users] Add process to Geoserver WPS
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.

Thanks - I'll give that a try.

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

I'll try and document my experiences as I go, I think that WPS is
finally going to let me solve a plan I started 11 years ago.

Cheers
Ian
--
Ian Turton

On Sat, Jan 22, 2011 at 8:26 PM, Ian Turton <ijturton@anonymised.com> wrote:

On Sat, Jan 22, 2011 at 1:13 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

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.

Thanks - I'll give that a try.

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

I'll try and document my experiences as I go, I think that WPS is
finally going to let me solve a plan I started 11 years ago.

Ha ha, I guess we're on the same boat. With WPS I get another inch
closer to reimplement my master thesis without any closed source
software :slight_smile:
It was about a multiuser system allowing to visually
create an store GIS data processing models, thematic maps,
share among users, document and rerun the same model
for repeatability, and so on... too bad the core was made in VB6
and built on top of Autocad Map...

Cheers
Andrea

Cheers
Ian
--
Ian Turton

--
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

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