Book Image

Python for ArcGIS Pro

By : Silas Toms, Bill Parker
Book Image

Python for ArcGIS Pro

By: Silas Toms, Bill Parker

Overview of this book

Integrating Python into your day-to-day ArcGIS work is highly recommended when dealing with large amounts of geospatial data. Python for ArcGIS Pro aims to help you get your work done faster, with greater repeatability and higher confidence in your results. Starting from programming basics and building in complexity, two experienced ArcGIS professionals-turned-Python programmers teach you how to incorporate scripting at each step: automating the production of maps for print, managing data between ArcGIS Pro and ArcGIS Online, creating custom script tools for sharing, and then running data analysis and visualization on top of the ArcGIS geospatial library, all using Python. You’ll use ArcGIS Pro Notebooks to explore and analyze geospatial data, and write data engineering scripts to manage ongoing data processing and data transfers. This exercise-based book also includes three rich real-world case studies, giving you an opportunity to apply and extend the concepts you studied earlier. Irrespective of your expertise level with Esri software or the Python language, you’ll benefit from this book’s hands-on approach, which takes you through the major uses of Python for ArcGIS Pro to boost your ArcGIS productivity.
Table of Contents (20 chapters)
1
Part I: Introduction to Python Modules for ArcGIS Pro
5
Part II: Applying Python Modules to Common GIS Tasks
10
Part III: Geospatial Data Analysis
14
Part IV: Case Studies
18
Other Books You May Enjoy
19
Index

Introduction to script tools

As discussed, a script tool is a tool written in Python with a tool dialog box where the user can input the parameters they want. The tool is added to an ArcGIS Pro toolbox, where the parameters and properties for the dialog box are set.

It has a different icon to an ArcGIS system tool or ModelBuilder model in a toolbox; the icon looks like a little scroll, and the title is something you can set:

Figure 6.1: A script tool in a toolbox

You use an interface to manually set the properties and parameters to align with how the script was written:

Figure 6.2: Script tool parameters

Once the script tool is created and tested, it can be used over and over by any user with access to the toolbox. The script tool will have the same interface as an ArcGIS Pro tool. This makes it so people who are new to Python within your organization can use the custom tools, as they look and feel familiar to them.

A script tool can be thought of...