You will learn: how to use ArcGIS Pro to create a geoprocessing result that can be shared as a geoprocessing package (
.gpkx file) and used with an ArcGIS Runtime app.
In this tutorial, you are going to perform a viewshed analysis for a location within the Santa Monica Mountains. The result of this analysis will be packaged into a geoprocessing package in order for it to be used with an ArcGIS Runtime application.
In ArcGIS Pro, you will add an observation location to a map containing a raster layer. The raster layer provides an elevation source which is used to calculate a viewshed from that observation location. The result of this viewshed operation will be packaged into a geoprocessing package (
.gpkx file) that is used by the ArcGIS Runtime Local Server to perform the same analysis in a Runtime application. Local Server is useful for performing advanced geospatial analysis on a single desktop device without a connection to the Internet.
If you do not have access to ArcGIS Pro, you can download the finished geoprocessing package here. Some ArcGIS Developer subscriptions include ArcGIS Pro. You can also start a 60 day free trial of ArcGIS Pro.
The raster data (
Santa-Monica-Mtns.tif) used for this tutorial can be downloaded here. Unzip this file to any location on your local machine.
Open ArcGIS Pro, create a new blank project and name it ViewshedAnalysis.
After the new project opens, create a new map by clicking New Map > New Map from the Insert tab on the ribbon.
From the ribbon, choose the Map tab, click the Add Data button, and browse to the
Santa-Monica-Mtns.tif file that you downloaded. Select it, and then click OK to add it as a raster layer to the map. You're now prepared to perform the viewshed analysis.
On the ribbon, click the Analysis tab. In the Geoprocessing group, click the Tools icon.
The Geoprocessing pane opens. In the search bar of the pane (Find tools), enter
viewshed. From the list of search results, choose Viewshed (Spatial Analyst Tools).
In the Viewshed pane, choose
Santa-Monica-Mtns.tif in the Input raster combo box.
Next to the Input point or polyline observer features parameter, click on the pencil icon and choose Points. Move your cursor to the map and choose an observer location on the raster layer by clicking once. This creates a point feature that represents the observer.
After adding the point, you'll still be in "add" mode. Exit out of this mode by hitting the Esc key on your keyboard.
Leave the remaining parameters as they are and click Run from the Geoprocessing pane.
When the tool successfully finishes running, a green check mark appears next to the tool name at the bottom of the Geoprocessing pane. The areas that are visible from the observation point are shown on the map in orange.
You are ready to package the result. The Package Result tool takes your result and creates a
.gpkx file from it.
In the Geoprocessing pane's search Find tools search bar, enter
Package Result. The Package Result (Data Management Tools) tool appears in the results. Click on it. The Parameters pane will open.
In the Parameters pane, the Results combo box allows you to choose one or many results to be packaged. Your most recent successful result will appear at the top of the list.
For Output file, choose a valid file path and file name for the
.gpkx file to be created.
Check the Support ArcGIS Runtime box in the Parameters pane.
Leave the remaining parameters as they are and click Run.
When the tool successfully finishes running, the geoprocessing package should be found in the output file location.
The package you've just created will be used in a later tutorial that performs a viewshed calculation in an ArcGIS Runtime application using Local Server.
Use the Geoprocessing Tools in ArcGIS Pro to share your
.gpkx with your ArcGIS Online account or with your organization. Hint: use the search bar to find the Share Package tool.