14. Network Analysis¶
Goal: Solve real-world transportation problems — routing, service areas, closest facility, and OD matrices.
What you need¶
- The Network Analyst extension (included with most ArcGIS Pro licenses)
- A network dataset (a road network with travel costs)
- Built locally from a road shapefile/feature class, OR
- Esri-hosted (via ArcGIS Online → Travel Modes) — uses ArcGIS Online credits
Easiest start
Use ArcGIS Online travel modes (driving time, walking, trucking). One credit per route. No need to build your own network at first.
The 5 solvers¶
flowchart LR
R[Route] -.->|"Best path A → B → C → D"| RU[Single trip]
SA[Service Area] -.->|"All places within 10 min"| SAU[Service polygon]
CF[Closest Facility] -.->|"Nearest 3 hospitals"| CFU[Distances]
OD[OD Cost Matrix] -.->|"Each origin to each destination"| ODU[Big distance table]
LA[Location-Allocation] -.->|"Optimal facility siting"| LAU[Best N sites]
classDef solver fill:#4338ca,stroke:#312e81,color:#fff
class R,SA,CF,OD,LA solver | Solver | Question it answers |
|---|---|
| Route | Optimal path from A → B → C → D |
| Service Area | All places reachable within X minutes |
| Closest Facility | Nearest N facilities to each incident |
| OD Cost Matrix | Travel time/distance between every origin and every destination |
| Location-Allocation | Where should we place new facilities to maximize coverage? |
Workflow (any solver)¶
- Create a network analysis layer (Analysis ribbon → Network Analysis dropdown).
- Add input features:
- Route → Stops
- Service Area → Facilities
- Closest Facility → Incidents + Facilities
- OD Cost Matrix → Origins + Destinations
- Set parameters in the Properties pane (cutoff, mode, breaks).
- Run (the green play button).
- Inspect the output (a sub-layer like
RoutesorPolygons).
Practical examples¶
"10-minute drive-time service area for each fire station"¶
- New Service Area analysis.
- Travel mode: Driving Time.
- Cutoffs: 10 minutes.
- Add fire stations as facilities.
- Solve. Output is a polygon per facility.
"Distance from every census block centroid to the nearest grocery store"¶
- New OD Cost Matrix.
- Origins: block centroids (~5,000 features).
- Destinations: grocery stores (~150 features).
- Cutoff: 30 minutes.
- Mode: Walking.
- Solve. Output is a table with origin ID, destination ID, and travel time.
→ Used in Food Desert Analysis.
"What's the optimal route to deliver these 12 packages?"¶
- New Route.
- Add 13 stops (depot + 12 deliveries).
- Tick Reorder Stops to Find Optimal Route.
- Solve.
Travel modes¶
| Mode | Use |
|---|---|
| Driving Time | Cars, default |
| Driving Distance | Length, not time |
| Walking Time | Pedestrian access |
| Walking Distance | E.g., half-mile to transit |
| Trucking | Respects truck restrictions |
| Custom | Define your own (HOV, scenic, etc.) |
Credits and limits¶
ArcGIS Online travel modes use credits:
- Route: ~0.5 credits per route
- Service Area: ~0.5 credits per facility
- OD Cost Matrix: ~0.0005 credits per pair (5,000 origins × 150 dests = ~3.75 credits)
Always run with a small subset first to confirm the result is correct before solving the full problem.
Local network datasets¶
For offline / unlimited use, build a network dataset from a road shapefile:
- Convert to a network dataset (
Create Network Datasettool). - Define connectivity, turn restrictions, and cost attributes (e.g., FT/TF travel time).
- Build the network (
Build Networktool).
This is more work but gives you a free, fast, customizable network.
Common pitfalls¶
Origins or destinations not snapping
Network solvers snap inputs to the nearest road segment within a default tolerance. If your points are in the wrong CRS, far from any road, or in a different country than the network, they'll be skipped (look for "Unlocated" status).
Service areas at extreme cutoffs
A 60-minute drive service area produces a huge polygon. Always start small and verify before scaling.
Practice¶
Hospital service area
- Add hospitals.
- New Service Area analysis with Driving Time, cutoffs
5, 10, 15. - Solve. The output has three nested polygons per hospital.
- Spatial Join with census blocks → estimate population in each band.
→ Next: Raster Analysis.