The Gift of Sharing
By Monica Pratt, ArcUser Editor
This article as a PDF.
Create a geoprocessing package by simply right-clicking the results of a process in the Results window and choosing Share As > Geoprocessing Package.
Sharing geoprocessing workflows with other GIS professionals has become a simple process using geoprocessing packages introduced in ArcGIS 10.1.
This article is concerned only with geoprocessing packages that joined four other kinds of packages—layer, map, locator, and tile—that ArcGIS generates. Packages bundle up data and expertise so they can be easily shared, standardizing and streamlining organizational processes.
A geoprocessing package is a single file that contains all the ArcGIS tools and data required for a geoprocessing workflow. It can be created as a local file that can then be shared as an attachment to an e-mail or a file upload or simply made available across the network. It can also be uploaded and shared to ArcGIS Online. In either case, it's all about sharing methodologies and tradecraft.
Why Use Geoprocessing Packages?
The most obvious reason for using geoprocessing packages is to share expertise. You might have an extensive background in a particular subject or technique that can help others. Conversely, you might need to learn more about a specific topic from someone. In addition to sample data and models that demonstrate the workflow, geoprocessing packages can include Microsoft Word files, PDFs, or other supporting documents that can further explain methods. You or the recipient of your geoprocessing package can study the methodology employed and apply it to other data.
Geoprocessing packages can enhance collaboration. Members of a team working on different aspects of a project at different locations can coordinate activities by periodically consolidating, packaging, and sharing the entire project with everyone. This conserves resources by avoiding duplicate efforts and enables more efficient teamwork.
Ensure the contents of your geoprocessing package are useful by documenting any custom tools and the package itself. Provide tags, a robust summary, code samples, and usage information.
Because they can contain other supporting documentation, geoprocessing packages are also a nifty way to supply training course materials to staff members or others outside your organization.
There are less obvious but quite valuable reasons to use geoprocessing packages. Consolidation—all by itself—is a great reason to use geoprocessing packages. A single map document and any model built from it can contain layers from a wide variety of sources. Some layers are on local disk, some are located on the network, while others may be obtained from enterprise databases. If you want to work on models in a disconnected environment, geoprocessing packages let you simply run the model to create results, then generate a package. Just the data and tools used by the model are included. Now your model is good to go.
Geoprocessing packages can be valuable even when you aren't sharing your workflow with anyone else. Perhaps you are tasked with a project that requires you to develop several different scenarios that make different assumptions. Once you have developed a particular scenario, you can bundle up all the data (edited for this scenario), models, and model parameters into a geoprocessing package that creates a snapshot of that scenario. Now you can move on to the next scenario. When you have developed all the scenarios needed, you can unpack the geoprocessing package for each scenario and compare them.
Creating and Using Geoprocessing Packages
Creating geoprocessing packages is simple and straightforward. Make sure the process runs correctly, right-click the result in the Results window, and choose Share As > Geoprocessing Package. You can add additional files, such as Word or PDF files, but not executable files. You can check Include Enterprise Geodatabase data instead of referencing so any related data residing in an enterprise geodatabase will be converted to a file geodatabase and included in the package. The option Support ArcGIS Runtime will only appear if you previously enabled this support by choosing Customize > ArcMap Options in the ArcMap Standard menu. Use the Add Result button if you wish to add another result to the package.
Unpacked geoprocessing packages appear on the Shared node in the Results window. The package file itself resides on your ArcGIS user folder.
Make sure you click the Analyze button. This process will identify any errors that must be corrected, issue warnings about aspects of the package that may impact its performance, and provide messages with suggestions for optimizing the package. Finally, click Share and let ArcGIS gather all the tools, models, scripts, data, environment settings, and documentation into one package for you.
Tip: If you get an error message that data was not found during packaging, the most likely cause is that you're packaging a result from the Previous Session node in the Results window. Since that result was created, the data has been deleted, moved, or renamed or for some other reason cannot be found. Fix this problem by rerunning the result (choosing either Open or Rerun) and package the new result.
Packages are not only easy to create but easy to use. They are supported in all ArcGIS applications. Unpacked geoprocessing packages will automatically show up in the Results window under the Shared node in ArcCatalog or the Catalog window in ArcMap. Like all package files, by default, the file itself is actually stored in C:\users\<username>\My Documents\ArcGIS\Packages (for Vista and Windows 7 users) and C:\Documents and Settings<username>\My Documents\ArcGIS\Packages (for Windows XP users). ArcGIS recognizes a geoprocessing package by its checksum and won't download and unpack the same package multiple times to the same location.
ArcGIS requires a minimal level of documentation when packaging a result, but the minimum may not be sufficient if you are sharing this package with a wider audience, particularly if you are uploading it to ArcGIS Online. The quality of your documentation will be better if you write it before starting the packaging process.
System tools are already documented, but if the package is based on results from a custom tool, you will have to supply that documentation. Document a custom model or script tool in ArcMap by right-clicking it in the Catalog window or the ArcToolbox window and selecting Item Description. In the Item Description window, click Edit and add tags and the summary for the tool (the minimum requirement). Under the Syntax section, expand each parameter and make sure Dialog Explanation is populated. It's a good idea to add any credit or usage information or code samples that will make the tool more useful to someone unfamiliar with it. When finished, click Save. Note that adding labels to ModelBuilder models or comments to Python code will make them more understandable.
In addition to documenting the tools that created the result, you need to document the package itself. Do this in your favorite text editor beforehand and copy and paste it into the package description text box.
Find and share geoprocessing tools, services, and samples by joining the Analysis and Geoprocessing Tool Gallery group, a public group on ArcGIS Online. Access the group using your organization's ArcGIS Online account or your free personal ArcGIS Online account.