52° North WPS with Catchment delineation algorithm
4.5K
A 52° north Web Processing Service extension based on TauDEM and GDAL.
This section will guide you to install the 52° North WPS and the Catelin extension. You can choose either a runtime installation using Docker or a development installation which will provide the source code of the components and the build process how-to.
There are multiple ways to install and setup a WPS extension. For more information, please read the 52° North WPS readme.
Depending on your operating system, choose the right one and follow the instructions on Docker web site.
1 - Launch a docker terminal (MacOSX, Windows) or run terminal (Linux)
2 - Pull the image with the following command:
$ docker pull zuncle/wps-catelin
3 - Create a named container using the following command (it will create and run the container):
$ docker run -d -it --name catelin -p 8888:8000 zuncle/wps-catelin
4 - To stop the container, use the following command:
$ docker stop catelin
5 - To restart the container:
$ docker start catelin
In the following examples, the IP address uses by the container is assumed to be 192.168.99.100.
Using a web browser, the following request shall returns the GetCapabilities of the 52° north WPS:
http://192.168.99.100:8888/wps/WebProcessingService?Request=GetCapabilities&Service=WPS
The process fr.pixime.wps.catelin.CatchmentDelineationAlgorithm shall appear in the response:
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</ows:Identifier>
<ows:Title>fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</ows:Title>
</wps:Process>
Using a web browser, the following request shall return the description of the catchment delineation algorithm:
http://192.168.99.100:8888/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&version=1.0.0&identifier=fr.pixime.wps.catelin.CatchmentDelineationAlgorithm
Using a web browser, the following url triggers a catchment delineation for the Logan DEM using an outlet located with NAD82/UTM zone 12N and coordinates (447560.16, 46112835.16):
http://192.168.99.100:8888/wps/WebProcessingService?Request=Execute&Service=WPS&version=1.0.0&identifier=fr.pixime.wps.catelin.CatchmentDelineationAlgorithm&DataInputs=Domain=Logan;X=447560.16;Y=4612835.91;SRS=EPSG:26912
You should get the following response indicating the geometry of the delineated catchment:
<wps:ExecuteResponse xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd" serviceInstance="http://localhost:8080/wps/WebProcessingService?REQUEST=GetCapabilities&SERVICE=WPS" xml:lang="en-US" service="WPS" version="1.0.0">
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</ows:Identifier>
<ows:Title>fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</ows:Title>
</wps:Process>
<wps:Status creationTime="2016-02-09T10:25:55.699Z">
<wps:ProcessSucceeded>Process successful</wps:ProcessSucceeded>
</wps:Status>
<wps:ProcessOutputs>
<wps:Output>
<ows:Identifier>FEATURES</ows:Identifier>
<ows:Title>FEATURES</ows:Title>
<wps:Data>
<wps:ComplexData mimeType="application/json">
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[451004.0191,4612862.4469],...
Clone 52° north WPS dev branch source code.
$ git clone https://github.com/52North/WPS.git
In the WPS root directory, type the following git command:
$ git submodule add https://[email protected]/zuncle/wps-catelin.git pixime-wps-catelin
This will create à directory for the sub module and clone the wps-catelin repository.
Open wps_config.xml. Find the element and add the following properties in order to:
<Repository name="LocalAlgorithmRepository" className="org.n52.wps.server.LocalAlgorithmRepository" active="true">
<Property name="Algorithm" active="true">fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</Property>
<Property name="Catelin.directory" active="true">/Users/pixime/dev/taudem/</Property>
<Property name="Catelin.numberOfProcesses" active="true">8</Property>
<Property name="Catelin.debugFolder" active="true">/Users/pixime/dev/taudem/debug</Property>
If these properties does not appear in the wps-config.xml (or their active attribute is set to false):
Run maven with the following options:
$ mvn clean install license:format -Dwps.config.file=WPS/52n-wps-webapp/src/main/webapp/config/wps_config.xml -DskipTests -Pwith-geotools
Create a directory on your computer, for example /tauDEM/data. Notice that the directory path shall match with the
property CatelinDirectory defined above.
Create the subdirectory uk90m in /tauDEM/data.
Download the files demp.tif and demsrc.tif and copy them in /tauDEM/data/uk90m.
In the following examples, the use of the port 8080 is assumed by the Tomcat server, as well as the availability of the uk90m domain DEM.
Using a web browser, the following request shall returns the GetCapabilities of the 52° north WPS:
http://localhost:8080/wps/WebProcessingService?Request=GetCapabilities&Service=WPS
The process fr.pixime.wps.catelin.CatchmentDelineationAlgorithm shall appear in the response:
<wps:Process wps:processVersion="1.0.0">
<ows:Identifier>fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</ows:Identifier>
<ows:Title>fr.pixime.wps.catelin.CatchmentDelineationAlgorithm</ows:Title>
</wps:Process>
Using a web browser, the following request shall return the description of the catchment delineation algorithm:
http://localhost:8080/wps/WebProcessingService?Request=DescribeProcess&Service=WPS&version=1.0.0&identifier=fr.pixime.wps.catelin.CatchmentDelineationAlgorithm
Using a web browser, the following url triggers a catchment delineation for the uk90m DEM and an outlet with the latlon coordinates (53.6768, -0.6877):
http://localhost:8080/wps/WebProcessingService?Request=Execute&Service=WPS&version=1.0.0&identifier=fr.pixime.wps.catelin.CatchmentDelineationAlgorithm&DataInputs=Domain=uk90m;X=-0.6877;Y=53.6768;SRS=EPSG:4326
You should get the following response indicating the geometry of the delineated catchment:
<wps:ProcessOutputs>
<wps:Output>
<ows:Identifier>FEATURES</ows:Identifier>
<ows:Title>FEATURES</ows:Title>
<wps:Data>
<wps:ComplexData mimeType="application/json">
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[-2.3233,52.9388],[-2.3233,52.9379], ...
...
Content type
Image
Digest
Size
2.2 GB
Last updated
over 10 years ago
docker pull zuncle/wps-catelin