Skip to main content

Should I use Routing or Matrix?

Short answer: Routing returns a path. Matrix returns a cost table. If you’re discarding the path and reading only duration, you asked the wrong question.

One rule

If you are writing a loop around a routing call, stop.You are building either a cost table (Matrix) or an itinerary (Tour Planning). Both exist. Both are cheaper.

The arithmetic

An n×m cost table costs n·m routing calls or 1 matrix call. A 20-depot, 500-stop assignment problem is 10,000 calls or 1. That’s a complexity difference, not a rate difference. No pricing negotiation closes it.

Where the loop hides

  • Nearest-driver assignment — one call per available driver
  • Store locator ranking — one per candidate store
  • Territory design — one per rep-base × unit centroid
  • Delivery zone economics — one per zone per candidate
  • Freight rating — one per lane, per quote, uncached
  • Site selection — one per demand cell per candidate
All matrices.

Why the mistake is systemic, not careless

Routing is discoverable first. It’s what you reach for when you need a travel time. The loop works. Correct answers. No error, no warning, no degradation. The failure is asymptotic. At five stops it’s imperceptible. Growth rates are invisible in a code review of the diff that introduced them. Matrix is async at scale. Submit-poll-retrieve is more code and more state. Engineers optimizing for the shortest path to a green test choose synchronous. The response shape is unfamiliar. Flat, row-major arrays — travelTimes: [73, 1231, 983, 400] for a 2×2 — not nested objects.
None of these are unreasonable. Naming the pattern explicitly in your architecture review is worth more than any amount of documentation.

The inverse error

Matrix returns no geometry. If a driver follows it, you needed Routing.

Size ceilings vary by mode

There is no single “HERE matrix size limit.”
ModeSyncAsyncLive traffic + custom options
Flexible15×10015×100Yes
Region (≤400 km)500×50010,000×10,000Yes
Profile500×50010,000×10,000No
A truck-constrained matrix with live traffic runs in Flexible mode and caps at 15 × 100.Read the spec before architecting against any headline figure.

Common misconceptions

“I’ll parallelize the loop.” You’ve converted a cost problem into a 429 problem. “Matrix is only for huge problems.” A 1×10 store ranking is one matrix call instead of ten routing calls. The ratio holds at every scale. “The flat array is just a format detail.” Index it wrong and you get a silently transposed matrix. Every travel time is plausible. Every assignment is wrong. Nothing throws.

Routing vs Matrix

The full decision tree, and the indexing helper you write once.

Matrix Routing

Modes, async lifecycle, per-cell error codes.

Distance Matrix

Working code, with the indexing helper.

Fleet Routing

Where the matrix feeds the solver.
HERE documentation: Matrix Routing v8 OpenAPI specification
Need production HERE API keys or implementation support? Placematic is an official HERE Technologies reseller and implementation partner. Talk to us.