WPS Builder
What is WPS Builder ?
WPS Builder allows to creates graphical process workflows that can be easily executed and reproduced. It allows Web Processing Services to operate through a user interface.
We have developed a version of WPS Builder adapted to the needs of NoiseModelling. This version being very close to the original version initially developed by former BoundlessGEO company.
Frequently Asked Question
What do the colors correspond to?
Orange block are mandatory
Beige blocks are optional
Green block are the output of the process*
Blocks get solid border when they are ready/filled
Can I save my WPS Builder project?
Yes. To save your WPS Builder project you two possibilities:
Export the blocks state into a JSON file
Export the blocks state and the whole database into a zip file (limited to 500 MB database)
1. Export/Import the blocks state
Click on the File icon and then choose Save project. The browser will save the file in your download folder.
Once you want to recover the saved state, click on File / Open project and select the saved file.
2. Export/Import the database
Click on the File icon and then choose Save project with database. The browser will save the file in your download folder.
How to run multiple processing at once ?
You can use the output of a processing block (like Import File) as the input of another process. To do this keep the left button of your mouse down while dragging the white square on the right side of a green output block to the left white square of the input of another process. Then run the last process in the chain in order to execute the whole processing.
I want to run the same processing but using a script not using my web browser, how do it ?
NoiseModelling WebServer is using the standard protocol named OGC Web Processing Service (WPS) Interface Standard. When you run a WPS block the WPS Builder is generating an equivalent Python script into the Python tab in the user interface. You can just copy/paste the script in a Python console and it should work (no dependency) as long as the NoiseModelling program is running in the background.
The generated Python script is using the synchronous WPS execution, so the server will not respond until the process is done or after the 60 seconds default timeout.
If the timeout is reached it will always return a message “Long running process..” like in the WPS Builder (But the job will still running on the server).
But you can use the asynchronous WPS API so the server will return a message immediately with links to follow the progression of the execution of your job.
You can use the OwsLib Python library to do so, here is an example of how to do it:
1import logging
2import sys
3from owslib.wps import WebProcessingService
4
5def main():
6 # Configure the root logger to output to stdout
7 logging.basicConfig(stream=sys.stdout, level=logging.INFO)
8
9 url = "http://localhost:8000/builder/ows"
10
11 # use jwt cookie header for authentification
12 jwt_token = ""
13 wps = WebProcessingService(url, skip_caps=False, headers={"Authorization": jwt_token})
14
15 # 2. List all available processes
16 print(f"\n--- Available Processes ---")
17 for process in wps.processes:
18 print(f"ID: {process.identifier}")
19 print(f" Title: {process.title}")
20 print(f" Abstract: {process.abstract}\n")
21 process_details = wps.describeprocess(process.identifier)
22 print(f" Inputs:")
23 for data_input in process_details.dataInputs:
24 print(f" ID: {data_input.identifier}")
25 if hasattr(data_input, 'title'):
26 print(f" Title: {data_input.title}")
27 if hasattr(data_input, 'dataType'):
28 print(f" Data Type: {data_input.dataType}")
29 if hasattr(data_input, 'minOccurs') and data_input.minOccurs == 0:
30 print(f" Optional")
31 if hasattr(data_input, 'abstract'):
32 print(f" Abstract: {data_input.abstract}")
33 if hasattr(data_input, 'allowedValues') and len(data_input.allowedValues) > 0:
34 print(f" Allowed values: {data_input.allowedValues}")
35 if hasattr(data_input, 'defaultValue') and data_input.defaultValue is not None:
36 print(f" Default : {data_input.defaultValue}")
37 print("")
38
39if __name__ == "__main__":
40 main()
1import logging
2import sys
3from owslib.wps import WebProcessingService, monitorExecution
4
5def main():
6 # Configure the root logger to output to stdout
7 logging.basicConfig(stream=sys.stdout, level=logging.INFO)
8
9 url = "http://localhost:8000/builder/ows"
10
11 # use java web token for authentification
12 jwt_token = ""
13 wps = WebProcessingService(url, skip_caps=False, headers={"Authorization": jwt_token})
14
15 target_id = "Database_Manager:Display_Database"
16
17 inputs = [('showColumns', "true")]
18
19 # Execute (sync or async)
20 execution = wps.execute(target_id, inputs)
21
22 # Monitor progress if it's a long task
23 monitorExecution(execution, sleepSecs=2)
24
25 if execution.isSucceded():
26 for output in execution.processOutputs:
27 print(f"Result {output.identifier}: {output.data}")
28 else:
29 print("Execution failed.")
30
31if __name__ == "__main__":
32 main()