Three friction‑free workflows—GUI wizard, Python script & ModelBuilder
TL;DR If you just need a quick win, jump to Method 1 (no coding). Power users should grab the ready‑made Python script in Method 2, or build a shareable drag‑and‑drop tool with ModelBuilder.
1 Introduction — why batch geocoding matters
Geocoding is the process of turning a text address into geographic coordinates (latitude/longitude).
When you need to locate hundreds or millions of customers, assets, or incidents, doing it one‑by‑one simply does not scale. ArcGIS Pro introduced several speed and usability upgrades that make truly large‑volume jobs practical on a desktop machine.
Common use‑cases:
Use‑case | Typical volume | Down‑stream task |
---|---|---|
Utility asset registry | 10 k–2 m | Network tracing |
Insurance exposure mapping | 100 k–5 m | Risk aggregation |
Retail site selection | 1 k–50 k | Drive‑time analytics |
(30‑second GIF demo goes here)
At the end of this tutorial you will be able to:
- Geocode any table with only the built‑in Geocode Addresses tool.
- Automate nightly batches with Python + ArcPy.
- Package a no‑code ModelBuilder tool for colleagues.
2 Prerequisites & data preparation
2.1 Software & licences
- ArcGIS Pro 3.4 or later (Standard licence ≈ GIS Professional Basic + Geocoding credits).
- Access to either:
- ArcGIS World Geocoding Service (consumes credits), or
- A local locator such as StreetMap Premium.
2.2 Input data checklist
Requirement | Notes |
---|---|
File format | CSV, Excel (xlsx), FGDB table, or feature class |
Mandatory fields | Address , City , State or Postal |
Character set | UTF‑8 (avoid smart quotes) |
Row quality | Remove empty rows & duplicate addresses to save credits |
customers.csv
┌─────────┬─────────────────────────────┬───────┬────────┬──────────┐
│ ID │ Address │ City │ State │ Postal │
├─────────┼─────────────────────────────┼───────┼────────┼──────────┤
│ 0001 │ 380 New York St │ Redlands │ CA │ 92373 │
│ 0002 │ 10 Downing St │ London │ │ SW1A 2AA│
└─────────┴─────────────────────────────┴───────┴────────┴──────────┘
Tip – free credits: An ArcGIS Developer account includes 2 000 geocode requests/month. Perfect for trying the workflow at zero cost.
3 Method 1 – point‑and‑click GUI (most approachable)
3.1 Add or select a locator
- Open Catalog ▶ Locators.
- Right‑click ▶ Add Locator.
- Choose the ArcGIS World Geocoding Service (requires sign‑in) or browse to a
.loc
file.
3.2 Run Geocode Addresses
(Screenshot of Geoprocessing pane here)
- Input Table → select your CSV.
- Input Address Locator → your chosen locator.
- Output Feature Class → e.g.
customer_geocoded
. - Open Advanced Settings and adjust:
Setting | Recommended | Why |
---|---|---|
Minimum Candidate Score | 80 | Lower = more matches, higher error risk |
Tie Handling | FIRST | Keeps the best candidate; review later |
Click Run.
3.3 Review & rematch in bulk
- In the attribute table, filter Status = “T” for ties or “U” for unmatched.
- Launch Rematch Addresses—a dockable panel lets you fix issues, auto‑select best candidate, or type corrections.
3.4 Export & share
- Share ▶ Package Layer to ArcGIS Online, or
- Data ▶ Export Features to Shapefile/KML/FGDB/GeoPackage.
Credit estimate widget:
<input id="rowCount"> × 0.04 credits/record = <span id="creditCost"></span>
(implement with a two‑line JavaScript snippet).
4 Method 2 – Python script (fastest repeat runs)
4.1 Why Python?
- No UI clicks once scripted → perfect for cron/Task Scheduler.
- Processes 100 k+ rows in chunks.
- Easy to integrate with ETL pipelines.
4.2 Boilerplate script
import arcpy
from pathlib import Path
# --- user parameters -------------------------------------------------
WORKSPACE = Path(r"C:\GIS\GeocodeDemo")
CSV_IN = WORKSPACE / "customers.csv"
LOCATOR = "ArcGIS World Geocoding Service"
OUTPUT_FC = WORKSPACE / "customers_gc"
BATCH_SIZE = 1000 # throttle to manage credits
COUNTRY = "USA" # speeds up matching
# ---------------------------------------------------------------------
arcpy.env.workspace = WORKSPACE
arcpy.SetLogHistory(False)
arcpy.geocoding.GeocodeAddresses(
in_table=str(CSV_IN),
address_locator=LOCATOR,
in_address_fields="SingleLine",
out_feature_class=str(OUTPUT_FC),
country=COUNTRY,
batch_size=BATCH_SIZE
)
print(arcpy.GetMessages())
4.3 Error handling
try:
# ...call GeocodeAddresses...
except arcpy.ExecuteError as err:
arcpy.AddError(err)
# refresh token & retry once
4.4 Scheduling tips
- Windows Task Scheduler → Create Task ▶ Action = “python.exe script.py”
- Linux/macOS →
crontab -e
then0 2 * * * /opt/arcgis/python/bin/python3 /path/script.py
5 Method 3 – low‑code ModelBuilder (visual pipeline)
5.1 Build the model
- Analysis ▶ ModelBuilder.
- Drag: Input Table, Geocode Addresses, Select Layer by Attribute, Append.
- Connect in order; double‑click each component to set parameters.
(Insert colour‑coded model screenshot)
5.2 Expose user parameters
- Right‑click any element → Parameter.
- Save the model to a toolbox; it shows up under Geoprocessing like any built‑in tool.
5.3 Export to Python
ModelBuilder ▶ Export ▶ To Python—gives you a ready script baseline for dev‑ops.
6 Performance & cost optimisation
Tip | Benefit |
---|---|
Strip unused fields in Field Map | Smaller feature class, faster draws |
Split by state/country | Lets you parallel‑run on multi‑core CPUs |
Pre‑clean addresses with Data Engineering | Fewer unmatched rows, credit savings |
De‑duplicate unique addresses | Credits are billed per input row |
7 Quality control & troubleshooting
Symptom | Likely cause | Fix |
---|---|---|
Many U unmatched rows | Missing ZIPs or diacritics | Lower Minimum Candidate Score to 75; normalise accents |
All matches in wrong country | Locator not restricted | Set Country Code parameter |
Token expired errors in Python | Long‑running job | Refresh token, catch ExecuteError , retry |
8 Exporting results
- CSV →
Table To Table
(include X/Y). - Web Map Layer → Share ▶ Web Layer (Feature).
- Styling: symbolise by Match Score (graduated colours) to flag low‑confidence points.