EDC Developer Forum Workshop 2013-07-19

In this workshop you will learn how to use version 1.1.0 of the 52°North Extensible WPS Client for ArcMap.

Installation

Just download the installer from here, double click on it and follow the inctructions. Note: If you are using ArcMap 10.1 and upgraded from 10.0, make sure the Client is installed in the right directory (e.g. C:\Program Files (x86)\ArcGIS\Desktop10.1).

Adding WPS processes

Start ArcMap. Open the Catalog Window (Windows -> Catalog). Open the GIS Servers tree. You should see a "Add WPS Server" item in the tree.

AddWPSServer.png

A double click on the item brings up the following dialog:

AddProcessDialog1.png

A predifined list of WPS-URLs comes with the installation. Select "http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService" and click "Get Processes". Leave the default version.

You will see a list of available processes appearing. A click on one of the processes will show information about the process.

AddProcessDialog2.png

Select the SimpleBuffer process and click "OK".

Note that you can add more than one process at once.

The process will be wrapped into a ArcMap Geoprocessing Tool and added to your toolboxes. In the Catalog window open the tree "My toolboxes".

There should be a toolbox named "WPS.tbx". If you open it you should see a toolset "http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService".

WPSToolbox1.png

This toolset contains the WPS process we just added.Its name is the process identifier "org.n52.wps.server.algorithm.SimpleBufferAlgorithm". A double click brings up the tool dialog:

Tool1.png

Have a look at the schemas and mimetypes. These are collected from the process description.

You could execute the process right away, if you had an input file that would match one of the schemas/mimetypes.

To execute the process with data coming from an ArcMap layer, we have to add some more tools.

Right click on "My Toolboxes" and select "New -> Toolbox". Name the new toolbox something like "WPS Client tools".

Right click on the new toolbox. Select "Add -> Tool".

Tools.png

Check Base64ConversionFunctionFactory, ZippedShapefileExport and -UnzipFunctionFactory and click "OK".

WPSClientTools1.png

Geoprocessing vector data

Create a new toolbox named "models". Right click on the new toolbox and select "New -> Model". A new Model Builder window will be opened with an empty model.

NewModel1.png

Go back to the WPS process tool ("org.n52.wps.server.algorithm.SimpleBufferAlgorithm") and drag it in the new window. Go to the "WPS Client tools" and drag the Shapefile Export and Unzip tool in the window.

NewModel2.png

Click the "Connect" button. Click on the result parameter of the Shapefile Export Tool and then click on the SimpleBufferAlgorithm tool. Select data.

NewModel3.png

Click on the result of the SimpleBufferAlgorithm tool and then click on the Shapefile Unzip tool. Select "Input Filename".

NewModel4.png

Do the same for result_mimeType and select "Mime Type" and for result_encoding and select "Encoding".

NewModel5.png

Right click on the Shapefile Export tool and select "Make Variable -> From Parameter -> Input Filename".

NewModel6.png

Right click on the new element and select "Model Parameter".

NewModel7.png

A "P" should appear on the top right of the element. Right click on the SimpleBufferAlgorithm tool and select "Make Variable -> From Parameter -> width".

NewModel8.png

Make this a model parameter, too. Also make the result of the Shapefile Unzip tool a model parameter.Your model should now look similar to this:

NewModel9.png

Double click the SimpleBufferAlgorithm tool.

SimpleBufferTool1.png

Select "application/x-zipped-shp" as the data_mimetype. Do the same with the result_mimetype and select base64 as result_encoding. Note: The RANDOM_FILE variable is a special identifier, please do not touch it in this case.

Click "OK". Save the model and close it. If you double click the model, a dialog will appear.

ModelDialog1.png

Here we can add input data and specify, where the result should be saved.

But first let us add some data. Close the model dialog. Add the tasmania_roads shapefile (tasmania_roads.zip).

Now open the model again. For the input parameter there is a drop box enabled with the tasmania_roads layer. Choose the layer from the drop box.

ModelDialog2.png

We choose a width of "0.2" (decimal degrees). For the result choose any filename and append the suffix ".shp".

ModelDialog3.png

Click "OK" to execute the process. You will see a dialog showing the log outputs.

SuccessfulExecution.png

In case something should go wrong you would see an error message appearing there. After a successful execution close the dialog. Switch to the results window (Geoprocessing -> Results).

Open the Current Session tree and the Model [XXX] item. Right click on "result XXXXX" and select "Add to Display".

BufferResult1.png

The buffered result should appear on the map.

Chaining WPS processes

Please add another WPS process, this time the "org.n52.wps.server.algorithm.!ConvexHull.!ConvexHullAlgorithm". Create a new model, add both Shapefile Tools, the SimpleBuffer tool and the new ConvexHull tool.

Connect:
  • The Shapefile export tool result to the SimpleBuffer data input
  • The SimpleBuffer result to the ConvexHull FEATURES input
  • The SimpleBuffer mime type to the ConvexHull FEATURES mime type
  • The ConvexHull RESULT to the Shapefile Unzip tool Input Filename
  • The ConvexHull RESULT mime type to the Shapefile Unzip tool mime type
  • The ConvexHull RESULT encoding to the Shapefile Unzip tool encoding
Make a model parameter from
  • Shapefile export tool input Filename
  • SimpleBuffer width
  • Shapefile Unzip tool result
Select "application/x-zipped-shp" for
  • SimpleBuffer tool data mime type
  • SimpleBuffer tool result mime type
  • ConvexHull RESULT mime type
Select base64 for
  • SimpleBuffer tool result encoding
  • ConvexHull RESULT encoding
Chain1.png

Double click on the new model. The dialog should look like the one from the first model.

Chain2.png

Select the tasmania_roads again and a width of "0.2". Also choose an output filename. Click "OK" and add the results to the map:

Chain3.png

Note: You could also add the intermediate result of the SimpleBuffer tool to the map. However, you will have to decode it first using the Base64Conversion tool.

Raster data processing

Open a new blank map. Add the process "r.los" from "http://geoprocessing.demo.52north.org:8081/wps/WebProcessingService". Hint: The process list is sorted alpabetically. Also, if you select a process from the process list, you can jump to other processes by typing characters. Create a new model. Add the r.los tool and also two times the Base64 Conversion tool from the WPS Client tools. This tool de- and encodes files in base64. We need to encode binary inputs and outputs (like images or shapefiles) in base64 because the data is send wrapped in a XML execute request.

Connect:
  • The output of the first Base64 Conversion tool to the input of the r.los tool
  • The output of the r.los tool to the input filename of the second Base64 Conversion tool
Make model parameters from
  • The input filename parameter of the first Base64 Conversion tool
  • The coordinate parameter of the r.los tool
  • the obs_elev parameter of the r.los tool
Select "image/geotiff" for
  • The input_mimetype parameter of the r.los tool
  • The output_mimetype parameter of the r.los tool
Select base64 for
  • The output_encoding parameter of the r.los tool
Remove the RANDOM_FILE variable from the output file parmeter of the second Base64 Conversion tool.

RlosModelComplete.png

Save and close the model. Add the elev_ned_30m.tif to the map (elev_ned_30m.tif). Open the new model. Select the elev_ned_30m layer. Use "641858,226042" for the coordinate and 155 for the obs_elev. Specify a filename for the output file. Add the suffix ".tif"

RlosModel1.png

Click "OK" to execute the model. Add the result to the map:

Rlosresult1.png

You can try out the process with other coordinates and obs_elev values. You can pick coordinates with the identify tool Identify.png (the format must be like "641858,226042").

Transforming and adding enviroCar Data to ArcMap

Open a new blank map. Add the process "org.n52.wps.server.algorithm.EnviroCarDataTransformAlgorithm" from "http://geoprocessing.demo.52north.org:8081/enviroCar-wps/WebProcessingService" to ArcMap. Create a new model and add the EnviroCarDataTransformAlgorithm tool and the Shapefile Unzip tool.

Connect:
  • The EnviroCarDataTransformAlgorithm result to the Shapefile Unzip tool Input Filename
  • The EnviroCarDataTransformAlgorithm result mime type to the Shapefile Unzip tool mime type
  • The EnviroCarDataTransformAlgorithm result encoding to the Shapefile Unzip tool encoding
Make a model parameter from
  • The EnviroCarDataTransformAlgorithm parameter url
  • The Shapefile Unzip tool result parameter
Select "application/x-zipped-shp" for
  • The EnviroCarDataTransformAlgorithm tool result mime type
Select base64 for
  • The EnviroCarDataTransformAlgorithm tool result encoding
EnviroCarModelComplete.png

Save and close the model. Double click on the model. Use "https://giv-car.uni-muenster.de/dev/rest/tracks/51e8169be4b058cd3d3a3745" for the url. Choose a new .shp file as output.

EnviroCarData1.png

Click "OK" to execute the model. Add the result to the map:

EnviroCarDataResult.png

You can select other track ids from "https://giv-car.uni-muenster.de/dev/rest/tracks/".

Connect a WPS process with a build-in ArcMap Geoprocessing tool

We use the EnviroCarDataTransformAlgorithm tool for this again. Create a new model and add the EnviroCarDataTransformAlgorithm tool, the Shapefile Unzip tool and the Create Thiessen Polygons tool (System Toolboxes -> Analyst Tools -> Create Thiessen Polygons.

Connect:
  • The EnviroCarDataTransformAlgorithm result to the Shapefile Unzip tool Input Filename
  • The EnviroCarDataTransformAlgorithm result mime type to the Shapefile Unzip tool mime type
  • The EnviroCarDataTransformAlgorithm result encoding to the Shapefile Unzip tool encoding
  • The Shapefile Unzip tool result parameter with the Input Features parameter of the Thiessen polygon tool
Make a model parameter from
  • The EnviroCarDataTransformAlgorithm parameter url
  • The Thiessen polygon tool Output Feature Class parameter
Select "application/x-zipped-shp" for
  • The EnviroCarDataTransformAlgorithm tool result mime type
Select base64 for
  • The EnviroCarDataTransformAlgorithm tool result encoding
Choose any filename ending with .shp for the Shapefile Unzip tool result parameter.

WPSAndGeoprocessingToolComplete.png

Save and close the model. Double click on the model. Use "https://giv-car.uni-muenster.de/dev/rest/tracks/51e8169be4b058cd3d3a3745" again (or any other track you found) for the url. Choose a new .shp file as output.

The model dialog should look like the previous one. Click "OK" to execute the model. Add the result to the map:

WPSAndGeoprocessingToolResult.png

*
I Attachment Action Size Date Who Comment
AddProcessDialog1.pngpng AddProcessDialog1.png manage 36 K 16 Jul 2013 - 17:15 UnknownUser  
AddProcessDialog2.pngpng AddProcessDialog2.png manage 42 K 16 Jul 2013 - 19:31 UnknownUser  
AddWPSServer.pngpng AddWPSServer.png manage 14 K 16 Jul 2013 - 17:15 UnknownUser  
BufferResult1.pngpng BufferResult1.png manage 108 K 16 Jul 2013 - 17:15 UnknownUser  
Chain1.pngpng Chain1.png manage 18 K 16 Jul 2013 - 17:15 UnknownUser  
Chain2.pngpng Chain2.png manage 20 K 16 Jul 2013 - 17:15 UnknownUser  
Chain3.pngpng Chain3.png manage 116 K 16 Jul 2013 - 17:15 UnknownUser  
EnviroCarData1.pngpng EnviroCarData1.png manage 21 K 16 Jul 2013 - 17:15 UnknownUser  
EnviroCarDataResult.pngpng EnviroCarDataResult.png manage 96 K 16 Jul 2013 - 17:50 UnknownUser  
EnviroCarModelComplete.pngpng EnviroCarModelComplete.png manage 9 K 16 Jul 2013 - 17:50 UnknownUser  
Identify.pngpng Identify.png manage 3 K 16 Jul 2013 - 17:15 UnknownUser  
ModelDialog1.pngpng ModelDialog1.png manage 20 K 16 Jul 2013 - 17:15 UnknownUser  
ModelDialog2.pngpng ModelDialog2.png manage 22 K 16 Jul 2013 - 17:32 UnknownUser  
ModelDialog3.pngpng ModelDialog3.png manage 20 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel1.pngpng NewModel1.png manage 55 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel2.pngpng NewModel2.png manage 43 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel3.pngpng NewModel3.png manage 41 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel4.pngpng NewModel4.png manage 44 K 16 Jul 2013 - 17:26 UnknownUser  
NewModel5.pngpng NewModel5.png manage 43 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel6.pngpng NewModel6.png manage 47 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel7.pngpng NewModel7.png manage 50 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel8.pngpng NewModel8.png manage 47 K 16 Jul 2013 - 17:16 UnknownUser  
NewModel9.pngpng NewModel9.png manage 12 K 16 Jul 2013 - 17:54 UnknownUser  
RlosModel1.pngpng RlosModel1.png manage 30 K 16 Jul 2013 - 17:50 UnknownUser  
RlosModelComplete.pngpng RlosModelComplete.png manage 10 K 16 Jul 2013 - 17:50 UnknownUser  
Rlosresult1.pngpng Rlosresult1.png manage 172 K 17 Jul 2013 - 04:14 UnknownUser  
SimpleBufferTool1.pngpng SimpleBufferTool1.png manage 36 K 16 Jul 2013 - 17:17 UnknownUser  
SuccessfulExecution.pngpng SuccessfulExecution.png manage 59 K 16 Jul 2013 - 17:17 UnknownUser  
Tool1.pngpng Tool1.png manage 26 K 16 Jul 2013 - 17:17 UnknownUser  
Tools.pngpng Tools.png manage 19 K 19 Jul 2013 - 04:55 UnknownUser  
WPSAndGeoprocessingToolComplete.pngpng WPSAndGeoprocessingToolComplete.png manage 11 K 17 Jul 2013 - 04:03 UnknownUser  
WPSAndGeoprocessingToolResult.pngpng WPSAndGeoprocessingToolResult.png manage 115 K 17 Jul 2013 - 04:03 UnknownUser  
WPSClientTools1.pngpng WPSClientTools1.png manage 6 K 16 Jul 2013 - 17:17 UnknownUser  
WPSToolbox1.pngpng WPSToolbox1.png manage 17 K 16 Jul 2013 - 17:17 UnknownUser  
elev_ned_30m.tiftif elev_ned_30m.tif manage 886 K 17 Jul 2013 - 04:03 UnknownUser  
tasmania_roads.zipzip tasmania_roads.zip manage 4 K 17 Jul 2013 - 04:03 UnknownUser  
Topic revision: r10 - 28 Jan 2014, EikeJuerrens
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback