[GIS] Scripting (with) WPS

geoserverqgisqgis-serverwps

As far as I understand WPS (web processing service) can be used to execute geospatial operations on the server side.

Is it possible to create scripts with WPS?

For example something like:
'check in a directory if there is a new file' – if so , 'process this file', 'store the result in the database'

I assume that I'm expecting too much, but what is the best solution for an script when using qgis server or geoserver?

D3

Best Answer

WPS is a stateless technology - you give it a process to execute (by HTTP GET or POST), and after some time, it gives you some sort of result. This may be a bit of XML or JSON, a link to an image, or the image itself.

On the server side, someone will have written one or more processes, detailing the expected inputs and the given outputs. The language these are written in are transparent to you the user. In the case of pyWPS they'll be written in Python. With the ZOO-project, it can be in one of a multitude of languages. But each process is completely standalone from any other process. Also, there is no standard set of processes that have to be created - so you are entirely at the whim of the WPS server you are connected to.

So the upshot is, the general way you as a user interact with a WPS is to chain processes together, and issue them in sequence via some sort of script. This could be some Javascript that makes successive execute requests, or a workflow system such as Taverna (see here for pyWPS working with Taverna). This is better than having monolithic processes on the server side because you keep nice small independent processes than can be chained in multiple ways rather than having to provide lots of parameters to control a process - and that's assuming you have access to the server in the first place. In addition, you could spread WPS servers over multiple machines, each one dedicated to a subset of processes which reduces server load, and provides possible parallelisation.

Related Question