The watershed (WS) tool – Howto and How

The WS tool: Howto



version française
ici

Access

The Watershed Tool (WT) is meant to be simple of use. No software needs to be installed nor database provided. Only the URL of the service-providing website is required.
The WT is provided as an addon to geOrchestra’s viewer.
It can be found either on the toolbar:

or in the « Tools » menu:

If not pre-loaded into the viewer it has to be selected from menu « Tools/Manage tools »:

Parametrising

The WT can be parametrised using menu / Parameters. One can select, the DEM used for computation out of a list, the computed catchment’s minimal area, the watershed’s smoothing mode of delineation, automatic vs. no zoom on resulting layer extent. Default parameters are fit for Brittany.

Execution

The watershed is computed from menu with one out of four possible input types corresponding to lines 1-4 of the menu :

  1. clicking on the map provides the associated coordinates (x,y);
  2. selecting point objects (as outlets) from a WMS layer (or a reference to a WMS layer_ provided by a third-party OGC server;
  3. a reference to a whole WMS point-layer (in this case the data are circulated between the WPS and the cartofgraphic server, to the exclusion of the client) ;
  4. a GML file (point list) in the maps’s current coordinate reference system (SRS), i.e. the french Lambert 93 by default, directly imported by the user into the viewer.

in addition, one can tune the parameters (a. select the DEM used for computation, smooth/unsmooth the result, zoom to result vs no zoom), access the service’s metadata (b.), or display this help file (c.).

Result

Once processed the resulting layer is automatically uploaded onto a dedicated OGC server then added as WMS to the viewer. Thus it benefits from the client’s (viewer) funcionalities, hence: display (WMS), download as a SHAPE file (WFS), spatial and attribute requesting tools (WMS/WFS), styling (SLD), context saving (WMC), etc.

How: the WS tool (Addon and WPS) as it works

Client to/from serverdata flows depending on input

To better understand the OGC traffic we provide a diagram (below) for each type of input. These are followed by a table summarising it all.

Functional diagram

The figures below expose the succession of OGC flows between the components of the SDI, depending on the selected input option:

  • mouse click (a),
  • GML file (b),
  • reference to an OGC layer (c),
  • selection from an OGC layer: (d) and (e) : in the former case the selection is sent whereas in the latter only a reference or description of the selection is sent.

a. mouse click as an input

b. GML point-file as input

c. reference to a (whole) OGC layer of points  as input
d. selection in a OGC point layer made in the viewer as input
e. reference to a OGC point-layer plus a description of a selection on this very layer as input

Table of OGC flows
A comparison of web traffic depending on the WT’s inputs. Cases (a) to (e) are listed in rows and numbers are those which describe the succession of flows in the correspondig figures.

Type of flow a b c d e
coordinates (x,y) are sent as a result of a mouse click in the viewer 1
incoming flow as a GML point file towards the viewer 1
WMS flow from the OWS cartographic server to the viewer (client) 1 1 1
WFS flow from the OWS cartographic server to the viewer (client) as a result of a selection 2
The viewer sends the GML file’s reference to addon 2 2 3
Transmission of the WMS’s reference 2
sending of the WMS’s and Openlayer.Filter filter’s references which translates the “select from” request 2
WPS flow triggered by the WS addon towards the WPS server 3 3 3 4 3
WFS flow from the OWS cartographic server to WPS server 4
WFS flow from the OWS cartographic server to the WPS server. Additionally the selection is conveyed by CQL filter 4
API REST deposits the process’s outcome  to third party OWS cartographic server 4 4 5 5 5
Output WPS flow (from WPS server to addon WS) 5 5 6 6 6
Addon WS sends the outcome’s reference  (WMS’s address) to the viewer 6 6 7 7 7
Client’s request  (the viewer) and third party server’s reply to send back the outcome (several OWS involved: WMS, WFS, SLD, WMC) 7 7 8 8 8

The WS WPS is triggered using the menu Hydrology / Watershed. It can manage alternatively four types of inputs, namely:

a) a mouse click on a location of the map, hence sending point coordinates (x,y);

b) a list of point coordinates in a GML file imported to the viewer by the user;

c) a reference to a whole point WMS layer (then the actual data flow directly between the OWS cartographic server and the WPS server.

d) an object (outlets, therefore of the point type) sélection from a WMS layer cast by a third party OWS server. A variant (e) consists of passing the reference to the selection instead of the selection itself in addition to the reference to the WMS layer.