Installation ************ http://pywps.wald.intevation.org/documentation/installation.html Debian Paket:: # dpkg -i pywps-VERSION.deb RPM:: # rpm -ivh pywps-VERSION.rpm Python Distutils:: $ tar -xzf pywps-VERSION.tgz $ cd pywps/ # python setup.py install Einfaches auspacken, wo es hingehört:: $ cd /usr/local/ $ tar xzf pywps-VERSION.tgz $ chmod -R a+w pywps/Temlates/1_0_0 Konfiguration ============= Umgebung Variablen ------------------- :envvar:`PYWPS_CFG` Path zu :file:`pywps.cfg` Konfigurations Datei :envvar:`PYWPS_PROCESSES` Path zu :file:`processes` Verzeichnis, wo die Prozessen abgelegt werden Konfigurationsdatei ------------------- .. note:: Die Konfigurationsdatei erzeugen wir in file:`$HOME/fossgis/fossgiswps.cfg` Ausgangs werte sind in :file:`pywps/default.cfg` gespeichert, man kann die Datei immer als Beispiel nehmen.:: [wps] encoding=utf-8 title=PyWPS Server version=1.0.0 abstract=See http://pywps.wald.intevation.org and http://www.opengeospatial.org/standards/wps fees=None constraints=none serveraddress=http://localhost/cgi-bin/wps keywords=GRASS,GIS,WPS lang=eng [provider] providerName=Your Company Name individualName=Your Name positionName=Your Position role=Your role deliveryPoint=Street city=City postalCode=000 00 country=eu electronicMailAddress=login@server.org providerSite=http://foo.bar phoneVoice=False phoneFacsimile=False administrativeArea=False [server] maxoperations=3 maxinputparamlength=1024 maxfilesize=3mb tempPath=/tmp processesPath= outputUrl=http://localhost/wps/wpsoutputs outputPath=/var/www/wps/wpsoutputs debug=true logFile= [grass] path=/usr/lib/grass/bin/:/usr/lib/grass/scripts/ addonPath= version=6.2.1 gui=text gisbase=/usr/lib/grass/ ldLibraryPath=/usr/lib/grass/lib gisdbase=grassdata/ Prozessen Verzeichnis --------------------- .. note:: Das PYWPS_PROCESSES Verzeichnis erzeugen wir unter :file:`$HOME/fossgis/processes` Das Verzeichnis muss :file:`__init__.py` Datei besitzen, wo die vorhandene Prozesse in der `__all__` Array auflistet werden:: __all__ = ['exampleBufferProcess','ultimatequestionprocess'] Jetzt können die Beispielprozesse in das Verzeichnis kopiert werden:: cp pywps/examples/exampleBufferProcess.py pywps/examples/ultimatequestionprocess.py /home/pywps/fossgis/ CGI-Wrapper Skript ------------------ .. highlight:: sh :linenothreshold: 5 Das Kommando :command:`wps.py` kann direkt aufgeruft werden, es ist aber nützlich einen cgi-wrapper Skript zu bauen. Es ist ähnlich zu dem MapServer Wrapper. Beispiel kann man unter :file:`pywps/doc/examples/pywps.cgi` finden.:: #!/bin/sh # Author: Jachym Cepicky # Purpose: CGI script for wrapping PyWPS script # Licence: GNU/GPL # Usage: Put this script to your web server cgi-bin directory, e.g. # /usr/lib/cgi-bin/ and make it executable (chmod 755 pywps.cgi) # NOTE: tested on linux/apache export PYWPS_CFG=/home/fossgis/fossgis/fossgiswps.cfg export PYWPS_PROCESSES=/home/fossgis/fossgis/prozesses/ /usr/bin/wps.py Der Skript sollte als :file:`/usr/lib/cgi-bin/fossgiswps` gespeichert werden.