Using Geocoding in Logistics

Most delivery problems start long before a vehicle leaves the depot, with an address that was vague, wrong or geocoded to the wrong spot. This piece looks at where location data goes wrong in logistics and how to fix it at the source.

Route optimization, live tracking and ETAs all assume one thing: that the coordinates attached to each stop are the place the parcel needs to go. When that assumption fails, everything downstream inherits the error. The driver arrives at the wrong side of a block, the customer gets a "we tried to deliver" message, and the parcel takes a second trip. Fixing the address and its geocode is usually cheaper than any of the downstream remedies, so it is worth understanding exactly how location data degrades.

Address quality is the root problem

A delivery address passes through several hands: a customer typing on a phone, a checkout form, an order system, a geocoder, a routing engine and finally a driver. Typical failure points include:

  • Missing or wrong components: no unit number, a misspelled street, a postcode from a neighboring district.
  • Ambiguity: the same street name in two suburbs of one city, or a building name that the geocoder does not know.
  • Silent fallback: the geocoder cannot find the house number, so it returns the street or the town, and nobody notices because a coordinate came back either way.
  • Right building, wrong point: the coordinate is correct for the building but sits in the middle of a roof, while access is from a different street.

The third failure is the most dangerous because it looks like success. A route planner has no way of knowing that a stop's coordinate is really the center of a town unless the precision is recorded alongside it.

Geocode precision levels

Most geocoders, open or commercial, tell you what kind of feature they matched, though the field names differ. A practical ladder, from best to worst:

LevelWhat the coordinate representsFit for last-mile?
Rooftop / address pointA point on or at the specific building or entranceYes
ParcelThe center of the land lotUsually, for small lots
Street-interpolatedA position estimated along a street segment from the house number rangeOften close, sometimes on the wrong side
StreetSomewhere on the named street, often its midpointOnly on short streets
Postcode / localityThe center of a postcode area, suburb or townNo; good for zoning only

Interpolation deserves a closer look because it is common and often trusted too much. Suppose a 200 m block carries numbers 100 to 198 on one side. The geocoder assumes they are evenly spaced, so number 150 is placed halfway, 100 m from the corner. If the real lots are uneven, say a large warehouse at the start of the block and small houses after it, number 150 might actually be 160 m along. The geocode is "on the right street" but 60 m out, possibly beside a different driveway. For a parcel van that means a walk and a search; for a truck it can mean the wrong loading entrance.

Coordinate rounding adds its own error. One thousandth of a degree of latitude is about 111 m everywhere. One thousandth of a degree of longitude is about 111 m × cos(latitude): roughly 101 m at 25° N and about 69 m at 51.5° N. Storing coordinates with only three decimals can therefore move a stop by more than the width of a city block. Five or six decimal places are appropriate for delivery points; you can check conversions with the coordinate converter.

Delivery points, centroids and entrances

Even a perfect rooftop geocode may not be where a driver should stop. Logistics teams increasingly keep several points per address:

Building centroid
The geometric middle of the footprint. Good for maps and analytics, but for a large building it can be far from any door.
Entrance
The door a person walks through. In a tower or mall this is what a courier on foot needs.
Delivery point
Where the vehicle should stop: a loading bay, a gate, a lay-by or the curb nearest the entrance. It may be on a different street from the postal address.
One parcel showing five candidate points: building centroid, entrance, delivery point at the curb, a street-interpolated point and a street midpoint Main Street parcel boundary A centroid B entrance C stop here D interpolated E street midpoint
Five plausible "locations" for one address. Routing should target C, the curbside delivery point near entrance B. Interpolated (D) and street-level (E) results can be on the wrong side of the parcel or a different block entirely.

The cheapest source of better delivery points is your own drivers. When a driver completes a stop, the device location at the moment of proof of delivery is a strong candidate for the real stopping point. After several successful deliveries cluster in the same place, promote that cluster to the address's delivery point and use it for future routes. Keep the raw geocode too, so you can tell when the two disagree.

Geofences for arrival detection

A geofence is a boundary, often a simple circle, around a stop. When the vehicle's position enters it, the system can mark "arrived", notify the customer or start a dwell timer. The radius is a trade-off: too small and GPS noise or a parking spot across the road means arrival never registers; too large and the system declares arrival while the driver is still a block away.

A worked example: a stop at 25.2048° N, 55.2708° E has a 75 m geofence. A vehicle reports 25.2053° N, 55.2713° E, which is 0.0005° further north and east. The haversine distance is about 75.0 m (roughly 55.6 m north and 50.3 m east), so the vehicle is right on the boundary. A few meters of GPS jitter will make it flicker in and out, which is why practical systems require a position to stay inside for a short time, or use a slightly larger exit radius than entry radius. You can reproduce the distance with the distance calculator.

Geofences are only as good as the point they surround. A circle drawn around a street-midpoint geocode will mark arrivals at the wrong place, so prefer delivery points over raw geocodes when you build them.

Depot and zone assignment

Once each order has a reliable coordinate, assigning it to a depot, hub or route zone becomes a spatial query instead of a manual lookup. Two approaches dominate:

  • Polygon zones: draw service areas and test which polygon contains the point. This is predictable and easy to explain to dispatchers, and it handles rivers, highways and borders that a straight-line rule ignores. The service coverage areas guide covers how to design them.
  • Nearest depot: pick the depot with the shortest straight-line or, better, driving distance. It adapts automatically when you add a site, but straight-line distance misleads wherever the road network does not follow it.

Whichever rule you use, record which precision level the assignment was based on. An order geocoded only to a postcode centroid near a zone edge should go to manual review rather than being silently assigned.

Address validation at checkout

The best moment to fix an address is while the customer is still on the page. Useful patterns:

  1. Use structured fields (street, number, unit, city, postcode) rather than one free-text box, so each part can be checked.
  2. Geocode on submit and inspect the precision. If the match is only street-level or coarser, ask the customer to confirm or correct it.
  3. Show the result on a small map and let the customer drag the pin to their door. This captures a delivery point directly from the person who knows it best.
  4. Offer a free-text "delivery instructions" field and keep it separate from the address so it does not break geocoding.

Mind your geocoder's terms when doing this. Some public services, including the public Nominatim instance, forbid autocomplete and ask that personal data not be sent, so a production checkout normally needs a contracted or self-hosted geocoder. Our OpenStreetMap geocoding guide covers those rules.

Places with weak street addressing

In many parts of the world, street names and house numbers are incomplete, informal or not used in everyday life. Addresses arrive as landmark-based directions such as "behind the mosque, second building after the pharmacy". A conventional geocoder will match the district at best.

Practical strategies include asking for a map pin at checkout rather than relying on text, storing the landmark directions as instructions for the driver, and building a history of confirmed delivery points per customer so the second order is easier than the first. Phone contact before arrival remains common for a reason.

Some cities have introduced official identification systems that sidestep street addresses. Dubai Municipality's Makani system, for example, assigns a 10-digit number to building entrances; the number is typically displayed on a plate at the entrance. When a market has a system like this, capturing the code at checkout and resolving it through the official service can be far more reliable than parsing a free-text address.

A data hygiene workflow

Location data decays: buildings are added, streets are renamed, customers move. Treat it as an ongoing process rather than a one-time cleanup:

  1. Normalize addresses into structured components and consistent abbreviations before geocoding.
  2. Geocode and score: store the coordinate, the precision level, the geocoder used and the date.
  3. Route low-precision results to review: anything coarser than street-interpolated gets a human or customer check before dispatch.
  4. Learn from deliveries: compare proof-of-delivery locations with geocodes and flag large gaps.
  5. Re-geocode periodically, especially records that were previously low-precision, as map data improves.
  6. Track failures by cause: separate "customer not home" from "address not found" so you can see whether data quality is improving.

For one-off checks on a handful of problem addresses, the address to coordinates tool shows what an OpenStreetMap-based geocoder returns for it, and the place name search lists competing candidates with their feature types. It is not a bulk service, but it is a quick way to see why a particular address keeps failing.

Key takeaways

  • Record precision with every geocode; a coordinate without a precision level cannot be trusted for last-mile work.
  • Rooftop and parcel results suit delivery; interpolated results are often close but can land beside the wrong driveway; postcode centroids are for zoning only.
  • Keep separate centroid, entrance and delivery points, and learn delivery points from completed stops.
  • Size geofences with GPS noise in mind and anchor them to delivery points, not raw geocodes.
  • Fix addresses at checkout with structured fields, precision checks and a map pin, especially where street addressing is weak.