You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

The PyWPS software was originally developed to use under Linux (Debian). However, it is also possible to use the software in a Windows environment for example for testing purposes. To do so, Apache server has to be installed on the system.

Step 1: 
Download PyWPS

Step 2:
Unpack the PyWPS folder and save the entire folder as 'c:\pywps'

Step 3:
Create a folder called c:\pywps_processes and add the file 'default.cfg' (from 'c:\pywps\pywps'), if you like you can insert your own information in the file.

Step 4:
Navigate to the Apache folder. In this folder you find a sub folder called cgi-bin, create a file called pywps.cgi in this folder and insert the following code in it:

import sys
sys.path.insert(0, r"c:\pywps")
import os
os.environ['PYWPS_CFG']='C:/pywps_processes/default.cfg'
os.environ['PYWPS_PROCESSES'] ='C:/pywps_processes'
import wps

Step 5:
Install the PyWPS Python package, open the Windows command line tool (start > run), drag and drop 'setup.py' from your 'c:\pywps' folder, type install after the location of the setup file and click ok. The PyWPS Python package is now installed.

Step 6:
Test your WPS by starting Apache server and navigate to http://localhost/cgi-bin/pywps.cgi 
The result should be something similar to this:

<ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd">
	<Exception exceptionCode="NoApplicableCode">
		<ExceptionText>'No query string found.'</ExceptionText>
	</Exception>
</ExceptionReport>

Step 7:
Add your own Python processes as WPS by copying your processes to the 'c:\pythonprocesses' folder.
In 'c:\pywps\tests\processes' some example processes are included, copy these to your 'c:\pythonprocesses' folder and find out whether you can get them to run.

Check whether all processes are recognized by doing a GetCapabilities request (http://localhost/cgi-bin/pywps_test.cgi?service=wps&request=GetCapabilities).

Note:
PyWPS can also be used with the Q-GIS WPS plugin by Dr. Horst Duester

  • No labels