mardi 28 Avril 2015 wps zoo saga
Another post in the innovative Web Processing Service series. We are this time introducing dozens of new WPS Services powered by ZOO-Project and SAGA GIS.
SAGA (System for Automated Geoscientific Analyses) is a popular open source GIS software with huge capabilities for geospatial data processing and analysis. It offers numerous tools to work with raster grids and imagery, but also TINs, vectors and point cloud datasets.
SAGA GIS provides a comprehensive set of geospatial methods, bundled in exchangeable module libraries. The main modules (see the full list here) allow various geoprocessing tasks such as grid calculations, filters or interpolations, terrain analysis, image classification, as well as vector based spatial analysis, geostatistics, kriging etc... The software implements many scientific models and algorithms which are commonly used through the SAGA user interface, API or command line utility.
Since a few days, the SAGA modules can also be executed with standard WPS requests. The ZOO-Project optional SAGA GIS support is indeed being introduced in the upcoming 1.5 release. The ZOO-Project WPS server is now able to load the SAGA C++ modules (as shared libraries) and to execute them server-side. This adds 300+ new WPS Services to the standard GetCapabilities response and brings the list of available ZOO-Services to the next level.
Once SAGA GIS 2.1.4 and dependencies installed on your system, along with fresh new ZOO-Project trunk (simply do ./configure --with-saga=/path/to/your/saga/install), the saga2zcfg utility program will write all the needed ZOO Service configuration files (.zcfg) in the corresponding SAGA modules directories, and each module can then be fully loaded, described and executed as WPS. The command line usually passed to the saga_cmd executable can now be sent as a valid WPS request, such as:
//localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=SAGA.Module_Name.Algorithm_Number&...
A first basic but meaningful example can be given using the Fractals module available in SAGA. The following WPS Service doesn't need any input, it simply outputs different kind of fractals according to default or user-defined parameters. The one shown here was generated using the Pythagora's tree algorithm with default parameters (SAGA.garden_fractals.1).
Using some of the many SAGA vector tools and a vector point dataset as input, we can for example compute its convexhull and minimum rectangle envelope (using SAGA.shapes_point.12) or its related Thiessen polygons (using SAGA.shapes_point.16) as shown bellow:
Using the SAGA Terrain Analysis tools and a well-known SRTM extract as input, we can also experiment some of the raster processing capabilities, for example by producing an hillshade out of it (using SAGA.ta_lighting.0) or computing catchments areas (using SAGA.ta_hydrology.2), as shown bellow:
Last but not least, using the SAGA TIN tools it is also possible to create detailed TINs from raster grids using the corresponding WPS Services. The following images shows an example generated TIN (both edges and triangles are returned by SAGA.tin_tools.1)
These examples demonstrate the basic use of the new ZOO-Project optional SAGA GIS support. This brings a new bunch of possibilities and additional processing capabilities to the Open WPS platform, with advanced models and new input formats (such as tables, TINs or LAS files). A blog post is not enough to fully describe all the potential of the SAGA based WPS Services, but we will soon come back on this topic. In the mean time, we invite you to install ZOO-Project and SAGA in order to test the WPS Services. Happy processing !
This work was supported by a grant from the European Union's 7th Framework Programme (2007-2013) provided for the project PublicaMundi (GA no. 609608).