You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Geoprocessing/Testing.md
+6
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,25 @@ It's a bit more difficult to fully test our Buffer function in a browser, but we
7
7
We will use the QGIS WPS Plugin to Execute this process, to save trying to pass the nodes of a polygon via a URL!
8
8
9
9
Go to the Applications button in the top left of your screen and go to Education\QGIS (not QGIS browser or server):
10
+
10
11

11
12
12
13
This will load QGIS 2.0, which is a little out of date but the same process should hold for later versions. Chances are, the WPS plugin is not yet installed, so click on Plugins on the top menu, and then "Manage and Install Plugins":
14
+
13
15

14
16
15
17
Select "Get more from the list on the left, then in the Search bar, type WPS. In the results window you should see "WPS Client". Select it, then click on "Install plugin":
18
+
16
19

17
20
18
21
Hopefully you will receive a message that the plugin installed successfully, then click on "Close" in the bottom right to close the plugin manager.
19
22
20
23
First, load some suitable data to construct a buffer with. The OSGeo Live DVD contains plenty of spatial data for us to use. Click on "Layer/Add Vector Layer" in the QGIS menu:
24
+
21
25

22
26
23
27
For the source dataset, browse to /home/user/data/vector/world_merc and click on world_merc.shp. If you can't see this, make sure that the file type dropdown list at the bottom of the browser window shows "ESRI Shapefiles [OGR]":
28
+
24
29

25
30
26
31
Then click "Open", and "Open" in the "add vector layer" dialog box to load the shapefile in the main window.
@@ -44,6 +49,7 @@ In the URL box type the path to the zoo_loader.cgi:
44
49
Click OK to make this dialogue box disappear, and then with your new connection visible in the Server Connections box, click "Connect" to connect to the server.
45
50
46
51
If the URL was correct, you should now see a long list of processes or Identifiers, with their Title and Abstract. If the list of Identifiers is not in alphabetical order, click the column title to sort it to your liking:
52
+
47
53

48
54
49
55
From the list, find the Buffer service, and either highlight it and click "OK", or double-click it. This will bring up a simple form with the Input Vales in it. Enter the following options:
Copy file name to clipboardexpand all lines: GettingStarted/HelloWorld.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -39,21 +39,21 @@ In the file manager, navigate to the /usr/lib/cgi-bin directory and right-click
39
39
40
40
The first 8 lines contain metadata about the service. These include the following:
41
41
42
-
***processVersion**: A user-defined version number for the service
43
-
***storeSupported**: Should ZOO be able to store the results of the service? (True/False)
44
-
***statusSupported**: Should ZOO be able to run the service as a background task? (True/False)
45
-
***serviceProvider**: The name of the file containing the code for the service
46
-
***serviceType**: The programming language used
42
+
***processVersion**: A user-defined version number for the service;
43
+
***storeSupported**: Should ZOO be able to store the results of the service? (True/False);
44
+
***statusSupported**: Should ZOO be able to run the service as a background task? (True/False);
45
+
***serviceProvider**: The name of the file containing the code for the service;
46
+
***serviceType**: The programming language used.
47
47
48
48
This section can also contain a <MetaData> section if you like, containing additional information about the service.
49
49
50
50
Below the metadata section are the DataInputs and DataOutputs sections. The DataInputs block contains the following:
51
51
52
-
***[name]**: The name of the input- this is how it will be referred to in the service code
53
-
***Title/Abstract**: Metadata about the input, for use in the DescribeProcess response
54
-
***minOccurs/maxOccurs**: Mandatory- the number of times the input will occur
55
-
***<LiteralData>**: The type of data node for the input. Remember from the introduction that the data type can either be LiteralData, BoundingBoxData or ComplexData.
56
-
***dataType**: The type of data for the given node.
52
+
***[name]**: The name of the input- this is how it will be referred to in the service code;
53
+
***Title/Abstract**: Metadata about the input, for use in the DescribeProcess response;
54
+
***minOccurs/maxOccurs**: Mandatory- the number of times the input will occur;
55
+
***<LiteralData>**: The type of data node for the input. Remember from the introduction that the data type can either be LiteralData, BoundingBoxData or ComplexData;
56
+
***dataType**: The type of data for the given node;
57
57
***<Default />**: Mandatory section, but not used for LiteralData types.
58
58
59
59
The DataOutputs block contains very similar sections, but instead of describing the input, it's describing the output response. Therefore it doesn't need to contain the minOccurs/maxOccurs sections.
@@ -68,9 +68,9 @@ Each service function must return an integer value representing the execution st
68
68
69
69
Each service takes exactly three arguments, and these are in the form of python dictionaries, which are a type of Key Value Pair:
70
70
71
-
***conf**: the main environment configuration (eg the information from main.cfg)
72
-
***inputs**: the requested or default inputs
73
-
***outputs**: the requested or default outputs
71
+
***conf**: the main environment configuration (eg the information from main.cfg);
72
+
***inputs**: the requested or default inputs;
73
+
***outputs**: the requested or default outputs.
74
74
75
75
If you open hello_service.py in a text editor you will see the following:
Copy file name to clipboardexpand all lines: Introduction/Summary.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ The three WPS packages are listed below.
4
4
5
5
## Geoserver
6
6
7
-

7
+

8
8
9
9
[Geoserver](http://Geoserver.org) is a fully featured Web Mapping Server, and WPS integration is available as an addition. It has the advantage of being easier to install and comes pre-configured with a number of WPS processes, but it is not possible to create your own processes.
Copy file name to clipboardexpand all lines: Routing/Map.md
+2
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,8 @@ The runRouting function is defined at line 597, and the first thing it does is t
82
82
83
83
Finally, two further WPS processes are also called in this block: UnionOneGeom and computeRouteProfile. These are needed for the elevation profile which is also computed, and the turn-by-turn directions.
84
84
85
+
### The End!
86
+
85
87
If you are interested in building your own web application for WPS using openlayers then there are a number of useful tutorials. For one that is specific to ZOO, I would recommend the [Practical Introduction to ZOO](http://www.zoo-project.org/docs/workshop/2010/index.html) given at FOSS4G 2010 (Osaka).
0 commit comments