Execute Sample

Feedback


Example usage

Supermap iServer WPS1.0.0 encapsulates a series of analysis functions included in the iServer (please refers to WPS overview). Users can perform these analyzes operations by the WPS service included in the SuperMap iServer, and the analysis results are as follows:

The sample performs the Execute operation for the supported functions by Execute of the WPS service, and executes the POST request, as follows:

  1. Overlay Analysis Function: Clip

Perform the clip analysis for the intersection of World.Countries.188 and World.Ocean.1, and the POST request address is http://localhost:8090/iserver/services/spatialanalyst-changchun/wps100. The request body is as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<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>Clip</ows:Identifier>

<wps:DataInputs>

  <wps:Input>

    <ows:Identifier>sourceGeometry</ows:Identifier>

    <ows:Title>sourceGeometry</ows:Title>

    <wps:Reference

xlink:href="http://localhost:8090/iserver/services/data-world/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Countries&FEATUREID=World.Countries.188&MAXFEATURES=1" />

  </wps:Input>

  <wps:Input>

    <ows:Identifier>operatePolygon</ows:Identifier>

    <ows:Title>operatePolygon</ows:Title>

    <wps:Reference

xlink:href="http://localhost:8090/iserver/services/data-world/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Ocean&FEATUREID=World.Ocean.1&MAXFEATURES=1" />

  </wps:Input>

  <wps:Input>

    <ows:Identifier>outputformat</ows:Identifier>

    <ows:Title>format.</ows:Title>

    <wps:Data>

      <wps:LiteralData>gml212</wps:LiteralData>

    </wps:Data>

  </wps:Input>

</wps:DataInputs>

<wps:ResponseForm>

  <wps:ResponseDocument storeExecuteResponse="true">

  <wps:Output asReference="true">

    <ows:Identifier>ClippedPolygon</ows:Identifier>

    <ows:Title>Clip from polygon.</ows:Title>

    <ows:Abstract>Clip polygon by other polygon. Accepts the polygon as

GML and provides GML output for the clip feature.

    </ows:Abstract>

  </wps:Output>

  </wps:ResponseDocument>

</wps:ResponseForm>

</wps:Execute>

 The response results as follows:

  1. Surface Analysis: ExtractIsoline

Extract isolines for the point dataset Company@Changchun. The POST address is http://localhost:8090/iserver/services/spatialanalyst-changchun/wps100. The request body is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<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>ExtractIsoline</ows:Identifier>

<wps:DataInputs>

  <wps:Input>

    <ows:Identifier>pointDataset</ows:Identifier>     

    <ows:Title>pointDataset</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>Company@Changchun</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>     

  <wps:Input>     

    <ows:Identifier>zValueField</ows:Identifier>     

    <ows:Title>zValueField.</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>SMID</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>    

  <wps:Input>     

    <ows:Identifier>Resolution</ows:Identifier>     

    <ows:Title>Distance which people will walk to get to a playground.

    </ows:Title>     

    <wps:Data>     

      <wps:LiteralData>20</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>            

  <wps:Input>     

    <ows:Identifier>Interval</ows:Identifier>     

    <ows:Title>Interval.</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>50</wps:LiteralData>     

    </wps:Data>    

  </wps:Input>    

  <wps:Input>     

    <ows:Identifier>ResampleTolerance</ows:Identifier>     

    <ows:Title>ResampleTolerance.</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>0.5</wps:LiteralData>     

    </wps:Data>    

  </wps:Input>    

  <wps:Input>     

    <ows:Identifier>SmoothMethod</ows:Identifier>     

    <ows:Title>SmoothMethod.</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>POLISH</wps:LiteralData>     

    </wps:Data>    

  </wps:Input>    

  <wps:Input>     

    <ows:Identifier>Smoothness</ows:Identifier>     

    <ows:Title>Smoothness.</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>3</wps:LiteralData>     

    </wps:Data>    

  </wps:Input>    

  <wps:Input>     

    <ows:Identifier>TerrainInterpolateType</ows:Identifier>     

    <ows:Title>TerrainInterpolateType.</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>IDW</wps:LiteralData>     

    </wps:Data>    

  </wps:Input>    

  <wps:Input>   

    <ows:Identifier>outputformat</ows:Identifier>   

    <ows:Title>format.</ows:Title>   

    <wps:Data>   

      <wps:LiteralData>gml212</wps:LiteralData>  

    </wps:Data>

  </wps:Input>  

</wps:DataInputs>    

<wps:ResponseForm>     

  <wps:ResponseDocument storeExecuteResponse="true">     

    <wps:Output asReference="false">     

      <ows:Identifier>ExtractedIsoregion</ows:Identifier>     

     <ows:Title>ExtractedIsoregion.</ows:Title>     

     <ows:Abstract>ExtractedIsoregion.</ows:Abstract>     

  </wps:Output>    

  </wps:ResponseDocument>   

</wps:ResponseForm>

</wps:Execute>

The response results as follows:

      

  1. Bus Transfer Analysis: StopListByKeyWord

Get the stop information by the keyword "Changchun" and then execute the POST request for http://localhost:8090/iserver/services/traffictransferanalyst-sample/wps100.

The request body is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<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>StopListByKeyWord</ows:Identifier>   

<wps:DataInputs>     

  <wps:Input>     

    <ows:Identifier>keyWord</ows:Identifier>     

    <ows:Title></ows:Title>     

    <wps:Data>     

      <wps:LiteralData>%e9%95%bf%e6%98%a5</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>     

  <wps:Input>     

    <ows:Identifier>returnPosition</ows:Identifier>     

    <ows:Title></ows:Title>     

    <wps:Data>     

      <wps:LiteralData>true</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>   

  </wps:DataInputs>    

<wps:ResponseForm>     

  <wps:ResponseDocument storeExecuteResponse="true">     

    <wps:Output asReference="false">     

      <ows:Identifier>StopListByKeyWord</ows:Identifier>     

      <ows:Title>StopListByKeyWord.</ows:Title>     

      <ows:Abstract>StopListByKeyWord.</ows:Abstract>     

    </wps:Output>    

  </wps:ResponseDocument>   

</wps:ResponseForm>

</wps:Execute>

The "% e9% 95% bf% e6% 98% a5" is gotten by the URL encoding on the keyword "Changchun".

The response results as follows:

  1. Transportation Analysis: Path

Get the optimal path through the network ID array [1,12], and then execute the POST request for http://localhost:8090/iserver/services/transportationanalyst-sample/wps100. The request body is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<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>Path</ows:Identifier>   

<wps:DataInputs>     

  <wps:Input>     

    <ows:Identifier>points</ows:Identifier>     

    <ows:Title></ows:Title>     

    <wps:Data>     

      <wps:LiteralData></wps:LiteralData>     

    </wps:Data>     

  </wps:Input>       

  <wps:Input>    

    <ows:Identifier>nodeIDs</ows:Identifier>     

    <ows:Title>nodeIDs</ows:Title>     

    <wps:Data>     

      <wps:LiteralData>1.12</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>     

  <wps:Input>     

    <ows:Identifier>hasLeastEdgeCount</ows:Identifier>     

    <ows:Title></ows:Title>     

    <wps:Data>     

      <wps:LiteralData>false</wps:LiteralData>     

    </wps:Data>     

  </wps:Input>      

  <wps:Input>     

    <ows:Identifier>networkName</ows:Identifier>     

    <ows:Title>networkName</ows:Title>        

    <wps:Data>     

      <wps:LiteralData>RoadNet@Changchun</wps:LiteralData>     

    </wps:Data>      

  </wps:Input>   

</wps:DataInputs>    

<wps:ResponseForm>     

  <wps:ResponseDocument storeExecuteResponse="true">     

    <wps:Output asReference="false">     

      <ows:Identifier>FindedPath</ows:Identifier>     

      <ows:Title>FindedPath.</ows:Title>     

      <ows:Abstract>JSON stream describing the finded Path.</ows:Abstract>     

    </wps:Output>    

  </wps:ResponseDocument>   

</wps:ResponseForm>

</wps:Execute>

The response results as follows:

Note: In the above request bodies, <wps:ResponseDocument storeExecuteResponse="true">, so the <wps:Reference> node under the <wps:Output> node of the response document records url of the analysis result. For instance, the clip analysis returns the RUL address of the analysis result; open the address in the browser: http://localhost:8090/iserver/services/spatialanalyst-changchun/wps100?request=getxml&file=ClippedPolygon.xml to get the clip analysis result, which also exists under the "% SuperMap iServer_HOME%\webapps\iserver\output\xml" folder; if <wps:ResponseDocument storeExecuteResponse="fasle">, after the post request,the analysis result will be returned, but the result file will not be stored.