Skip to content

Workshop

Jachym Cepicky edited this page Aug 30, 2016 · 1 revision

This workshop is

Workshop Programme

Introduction

PyWPS Concept

Installation

Configuration

Testing PyWPS-Demo

Process writing

Process deployment

Testing

POST requests

wget --post-file file.xml --content-on-error -O - "http://localhost:5000/wps"

GetCapabilities

<?xml version="1.0" encoding="UTF-8"?>
<wps:GetCapabilities language="cz" service="WPS" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_request.xsd">
  <wps:AcceptVersions>
    <ows:Version>1.0.0</ows:Version>
  </wps:AcceptVersions>
</wps:GetCapabilities>

DescribeProcess

<?xml version="1.0" encoding="UTF-8"?>
<wps:DescribeProcess service="WPS" version="1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_request.xsd">
  <ows:Identifier>demobuffer</ows:Identifier>
</wps:DescribeProcess>

Execute -- reference input

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0" 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/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
  <ows:Identifier>demobuffer</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>vector</ows:Identifier>
      <wps:Reference method="GET" xlink:href="http://localhost:5000/static/data/point.gml"/>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>size</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>30</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
</wps:Execute>

Execute - embed input

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0" 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/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
  <ows:Identifier>demobuffer</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>vector</ows:Identifier>
      <wps:Data>
      <wps:ComplexData>
        <ogr:FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ogr.maptools.org/ point.xsd" xmlns:ogr="http://ogr.maptools.org/" xmlns:gml="http://www.opengis.net/gml">
          <gml:boundedBy>
            <gml:Box>
              <gml:coord><gml:X>0.04853540200402788</gml:X><gml:Y>0.01369376726825339</gml:Y></gml:coord>
              <gml:coord><gml:X>0.04853540200402788</gml:X><gml:Y>0.01369376726825339</gml:Y></gml:coord>
            </gml:Box>
          </gml:boundedBy>
          <gml:featureMember>
            <ogr:point fid="point.0">
              <ogr:geometryProperty><gml:Point><gml:coordinates>0.048535402004028,0.013693767268253</gml:coordinates></gml:Point></ogr:geometryProperty>
              <ogr:id>2</ogr:id>
            </ogr:point>
          </gml:featureMember>
        </ogr:FeatureCollection>
        </wps:ComplexData>
        </wps:Data>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>size</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>30</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
</wps:Execute>

Execute - async

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0" 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/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
  <ows:Identifier>demobuffer</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>vector</ows:Identifier>
      <wps:Reference method="GET" xlink:href="http://localhost:5000/static/data/point.gml"/>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>size</ows:Identifier>
      <wps:Data>
        <wps:LiteralData>30</wps:LiteralData>
      </wps:Data>
    </wps:Input>
  </wps:DataInputs>
<wps:ResponseForm>
    <wps:ResponseDocument status="true" storeExecuteResponse="true">
      <wps:Output asReference="true">
        <ows:Identifier>output</ows:Identifier>
      </wps:Output>
    </wps:ResponseDocument>
  </wps:ResponseForm>
</wps:Execute>

Closing

Final words

You can’t perform that action at this time.