Man hat 3 Möglichkeiten, wie man PyWPS aufruft:
$ export PYWPS_CFG=/home/fossgis/fossgis/fossgiswps.cfg
$ export PYWPS_PROCESSES=/home/fossgis/fossgis/prozesses/
$ wps.py "service=wps&request=getcapabilities"
Man sieht direkt was los ist, sowohl auf STDOUT als auch auf STDERR
wget:
$ wget -O - "http://localhost/cgi-bin/fossgiswps?service=wps&request=getcapabilities"
Im Webbrowser (mit dem FOSSGIS-Life CD benutzt Firefox)
http://localhost/cgi-bin/fossgiswps?service=wps&request=getcapabilities
Immer ist es gut tail -f /var/log/apache/error.log nebenbei zu laufen.
Entweder:
$ export PYWPS_CFG=/home/fossgis/fossgis/fossgiswps.cfg
$ export PYWPS_PROCESSES=/home/fossgis/fossgis/prozesses/
$ wps.py "service=wps&request=getcapabilities"
Oder
http://localhost/cgi-bin/fossgiswps?service=wps&request=getcapabilities
Parametern
1 2 3 4 5 | $ export PYWPS_CFG=/home/fossgis/fossgis/fossgiswps.cfg
$ export PYWPS_PROCESSES=/home/fossgis/fossgis/prozesses/
$ export REQUEST_METHOD=POST
$ cat pywps/doc/examples/wps_getcapabilities_request.xml | wps.py
|
XML Encoding
1 2 3 4 5 6 7 8 | <?xml version="1.0" encoding="UTF-8"?>
<!-- WPS GetCapabilities request-->
<!-- Equivalent GET request is http://foo.bar/foo?Service=WPS&Version=1.0.0&Request=GetCapabilities&Language=en-CA -->
<ows:GetCapabilities xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 ..\wpsGetCapabilities_request.xsd" language="en-CA" service="WPS">
<ows:AcceptVersions>
<ows:Version>1.0.0</ows:Version>
</ows:AcceptVersions>
</ows:GetCapabilities>
|
XML Datei (pywps/doc/examples/wps_describeprocess_request.xml):
1 2 3 4 5 | <?xml version="1.0" encoding="UTF-8"?>
<DescribeProcess xmlns="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 ..\wpsDescribeProcess_request.xsd" service="WPS" version="1.0.0" language="en-CA">
<ows:Identifier>exampleBufferProcess</ows:Identifier>
<ows:Identifier>ultimatequestionprocess</ows:Identifier>
</DescribeProcess>
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
<ows:Identifier>exampleBufferProcess</ows:Identifier>
<wps:DataInputs>
<wps:Input>
<ows:Identifier>data</ows:Identifier>
<wps:Reference xlink:href="http://les-ejk.cz/schulung/pywps-de/_images/line.xml"/>
</wps:Input>
<wps:Input>
<ows:Identifier>width</ows:Identifier>
<wps:Data>
<wps:LiteralData>2</wps:LiteralData>
</wps:Data>
</wps:Input>
</wps:DataInputs>
<wps:ResponseForm>
<wps:ResponseDocument wps:lineage="false" wps:storeExecuteResponse="true" wps:status="false">
<wps:Output wps:asReference="false">
<ows:Identifier>buffer</ows:Identifier>
</wps:Output>
</wps:ResponseDocument>
</wps:ResponseForm>
</wps:Execute>
|