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

*

Topic attachments
I Attachment Action Size Date Who Comment
PNGpng AddProcessDialog1.png manage 36.8 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng AddProcessDialog2.png manage 42.7 K 2013-07-16 - 19:31 BenjaminPross  
PNGpng AddWPSServer.png manage 14.4 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng BufferResult1.png manage 108.2 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng Chain1.png manage 18.2 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng Chain2.png manage 20.1 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng Chain3.png manage 116.9 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng EnviroCarData1.png manage 21.7 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng EnviroCarDataResult.png manage 96.3 K 2013-07-16 - 17:50 BenjaminPross  
PNGpng EnviroCarModelComplete.png manage 9.5 K 2013-07-16 - 17:50 BenjaminPross  
PNGpng Identify.png manage 3.3 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng ModelDialog1.png manage 20.5 K 2013-07-16 - 17:15 BenjaminPross  
PNGpng ModelDialog2.png manage 22.5 K 2013-07-16 - 17:32 BenjaminPross  
PNGpng ModelDialog3.png manage 20.8 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel1.png manage 55.2 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel2.png manage 43.7 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel3.png manage 41.9 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel4.png manage 44.2 K 2013-07-16 - 17:26 BenjaminPross  
PNGpng NewModel5.png manage 43.8 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel6.png manage 47.8 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel7.png manage 50.3 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel8.png manage 48.0 K 2013-07-16 - 17:16 BenjaminPross  
PNGpng NewModel9.png manage 12.1 K 2013-07-16 - 17:54 BenjaminPross  
PNGpng RlosModel1.png manage 30.5 K 2013-07-16 - 17:50 BenjaminPross  
PNGpng RlosModelComplete.png manage 10.2 K 2013-07-16 - 17:50 BenjaminPross  
PNGpng Rlosresult1.png manage 172.3 K 2013-07-17 - 04:14 BenjaminPross  
PNGpng SimpleBufferTool1.png manage 36.8 K 2013-07-16 - 17:17 BenjaminPross  
PNGpng SuccessfulExecution.png manage 59.6 K 2013-07-16 - 17:17 BenjaminPross  
PNGpng Tool1.png manage 26.1 K 2013-07-16 - 17:17 BenjaminPross  
PNGpng Tools.png manage 19.7 K 2013-07-19 - 04:55 BenjaminPross  
PNGpng WPSAndGeoprocessingToolComplete.png manage 11.7 K 2013-07-17 - 04:03 BenjaminPross  
PNGpng WPSAndGeoprocessingToolResult.png manage 115.3 K 2013-07-17 - 04:03 BenjaminPross  
PNGpng WPSClientTools1.png manage 6.5 K 2013-07-16 - 17:17 BenjaminPross  
PNGpng WPSToolbox1.png manage 17.6 K 2013-07-16 - 17:17 BenjaminPross  
PNGtif elev_ned_30m.tif manage 886.4 K 2013-07-17 - 04:03 BenjaminPross  
Compressed Zip archivezip tasmania_roads.zip manage 4.8 K 2013-07-17 - 04:03 BenjaminPross  
Tags:
create new tag
, view all tags
Topic revision: r10 - 2014-01-28 - 08:57:42 - EikeHinderkJuerrens

 
  • Search: 
This site is powered by the TWiki collaboration platform Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback