Book Image

Programming ArcGIS with Python Cookbook, Second Edition

By : Eric Pimpler
Book Image

Programming ArcGIS with Python Cookbook, Second Edition

By: Eric Pimpler

Overview of this book

The book kicks off with the fundamentals of starting to use Python with ArcGIS, followed by recipes on managing map documents and layers, including how to find and fix broken data links in these files. In the second part of the book, you will learn to create custom geoprocessing tools and how to use the Attribute and Location tools to select specific features. The third part of the book covers topics for advanced users including the REST API, and also teaches you how to use Python with ArcGIS Pro. The book finishes with appendices covering how to automate Python scripts, and the five things that should be at the back of every GIS programmer's mind.
Table of Contents (17 chapters)
16
Index

Geocoding with the Esri World Geocoding Service

The Esri World Geocoding Service can be used to find addresses and places in supported countries. This service contains both free and paid operations. The find operation, which finds one address per request, is always a free service. The geocodeAddresses operation accepts a list of addresses for geocoding and is a paid service only. The other operations can be free or paid. If you are using the operations in a temporary capacity, they are free. Temporary simply means that you aren't storing the results for later use. If this is the case, then it is a paid service. In this recipe, you will use the Esri World Geocoding service to geocode an address.

Getting ready

The ArcGIS REST API find operation can be used to find the geographic coordinates of a single address. As we've done in the past few recipes, we'll use the Python requests module to make the request and process the response.

How to do it…

  1. In IDLE or another Python...