Logistics and delivery

Route corridor geofences: knowing when a truck leaves the road

A route corridor is a geofence drawn along a planned road. When it suits fixed trunk routes and valuable loads, how to set a width that tolerates fuel stops and diversions, who gets the alert, and how to review deviations.

Ashish Srivastava6 min read

A heavy truck drives along a long straight highway through open farmland at dusk

A route deviation alert tells you when a truck leaves the road it is meant to keep to. In a GPS tracking platform it is built from a route corridor: a geofence drawn as a line along the planned road, with a width on each side. Attach the corridor to the trucks on that lane, add an alert rule for leaving it, and the people you choose hear about it as soon as a truck's position falls outside. The corridor watches the road you drew; it does not plan a route or tell the driver where to go. This article explains what a corridor is, when it is the right tool, how to choose a width that tolerates fuel stops and diversions, and how to review deviations afterwards.

Key takeaways

  • A corridor is a line along a road with a width on each side; a circle or polygon marks a place instead.
  • It suits fixed trunk routes, high-value loads and roads agreed with a customer or an insurer.
  • The width decides everything: too narrow raises false alerts, too wide misses parallel roads.
  • Leaving the corridor raises a Geofence exit event; an alert rule decides who is told and how.
  • A corridor plans nothing. It compares where the truck went with the road you drew.
  • Review each deviation on the trip replay before you draw conclusions.

What a corridor is, compared with a circle or polygon

Alongpin has three geofence shapes:

  • Circle: a centre and a radius, for a single place such as a depot or a customer's yard.
  • Polygon: an outline, for an area with an irregular boundary, such as a port terminal or an industrial estate.
  • Route: a line of two or more points with a Width each side, for a road.

A circle or polygon answers "did the truck arrive at, or leave, this place?". A route corridor answers "did the truck stay on this road?". Every position the truck sends is checked against the corridor: inside means within the width of the line, outside means beyond it. When a position falls outside after one inside, the platform records a Geofence exit event; when the truck comes back, a Geofence enter.

You can draw the line on the map, clicking along the road and double-clicking to finish, or import it from a GPX track a driver recorded on the real route. Circle, polygon or route corridor compares the three shapes, and the geofences page shows them on the map.

Illustration of a road seen from above with a shaded corridor along it, a truck inside and a second truck on a side road outside it

Use cases: fixed trunk routes, high-value loads, agreed roads

A corridor is worth drawing where the road itself matters, not just the destination:

  • Fixed trunk routes. Night trunking between two depots, a daily shuttle to a factory, a regular haul to the port. The road rarely changes, so any departure from it is worth a look.
  • High-value or sensitive loads. Electronics, pharmaceuticals, cash in transit. A truck that leaves the agreed road may be lost, diverted or in trouble, and you want to know at once.
  • Roads agreed with a customer, an insurer or an authority. Some contracts and permits name the route a load must take. A corridor records whether it did.
  • Restricted roads. A heavy vehicle that should keep off a town centre or a weak bridge: the corridor follows the permitted road around it.

For a multi-drop round that changes every day, a corridor is the wrong tool; zones at the customer sites tell you more. The fleet solution shows how corridors, zones and reports fit together in a fleet's day.

Choosing a width that allows fuel stops and diversions

Width each side is how far from the line a position still counts as inside; left empty it is 25 metres. That suits a quiet lane drawn accurately, but on a trunk route it is usually too tight. Think about:

  • GPS wander. Positions drift by several metres in the open and more under bridges, in cuttings or between tall buildings.
  • Dual carriageways and junctions. The line runs down the middle; the truck drives in a lane on one side. Large junctions and slip roads swing further out.
  • Fuel stops and rest areas. A service area set back from the motorway lies outside a narrow corridor. Either widen the corridor there by adding points through the service area, or accept the exit and tell the dispatcher which stops are normal.
  • Short diversions. Roadworks and accidents push traffic onto parallel roads for a few hundred metres. A corridor that tolerates them saves alerts; one that does not catches every diversion.

A useful method: start wider than you think, say a road's width plus a generous margin on each side, run it for a week, and look at where the exits happen. Narrow the corridor where nothing ever comes close to the edge; widen it, or add points, at the bends and junctions that keep raising exits. Too wide is a risk too: a corridor of several hundred metres in a city lets a truck take a parallel street without anyone hearing about it.

The geofences map editor with the Route tool chosen to draw a corridor along a road
Draw the corridor along the road, then set its width each side.

The leave event and who is told

Every exit is recorded as an event, whether or not anyone is told. Telling people is the job of an alert rule. Under Alerts, choose New alert rule, pick Geofence exit under When this happens, tick the corridor under Only these geofences, and choose the channels under Tell people by: push, email, text message, Telegram or webhook, as your administrator has switched them on. Then choose the trucks and the people who receive it: the dispatcher on duty, the transport manager, a security desk for valuable loads.

Two settings keep it useful:

  • Attach the corridor only to the trucks on that lane. A truck on another route would leave it on every trip.
  • Give the corridor a calendar for the hours the route runs. Outside them, the same truck drives to the workshop or home to the depot without raising exits. With a calendar on the corridor, events are recorded only while it is in progress.

For high-value loads, a second rule for Geofence enter tells you when the truck is back on the road, which closes the incident without a phone call. The alerts page covers rules, channels and calendars.

What a corridor does not do: it plans no route

A corridor is a line you drew. It does not:

  • Plan or optimise routes. It knows nothing about traffic, tolls or the fastest road.
  • Navigate the driver. The driver sees nothing from the corridor in the cab.
  • Know why the truck left. A road closure, a police diversion, a fuel stop and a detour to an unofficial stop all look the same.
  • Predict arrival times. The platform makes no arrival time estimates.

When the road changes for a week, for example long roadworks, draw the diversion as a second corridor and attach it for that week, or tell the dispatchers which exits to expect.

Reviewing deviations on the trip replay

An exit alert is a question, not a verdict. Open Replay, pick the truck and the day, and play the trip. Geofence exits and entries are marked on the track and the timeline, so Next event takes you straight to the moment the truck left the corridor. You see where it went, how long it was off the road and where it came back.

A transport manager and a driver talk over coffee in a depot office early in the morning

Most deviations have a plain explanation: a closed road, a fuel stop, a missed exit. Ask the driver before you draw conclusions. Look for patterns over weeks instead: the same bend raising exits every night means the corridor needs another point; the same detour by several drivers may mean the official road is worse than it looks on the map. The Events report lists all exits for a period, for the monthly review.

How Alongpin helps

Alongpin (alongpin.com) is a GPS tracking platform you open in a browser or on your phone. Dispatch sees every vehicle on the live map, geofences record arrivals and time on site at depots and customers, and a share link lets a customer follow one delivery without an account. Trip history and reports settle questions after the fact. See how it works for fleets, check your trackers in the device check, or sign up.

Frequently asked questions

How wide should a route corridor be?

Wide enough to cover the carriageway, GPS wander and the junctions on the route, and narrow enough to exclude parallel roads. Start generous and narrow it after a week of real trips.

Can I import the route instead of drawing it?

Yes. Import on the geofences list reads GPX, KML and GeoJSON; a GPX track becomes a route, and the dialog asks for the width.

Will I get an alert at every fuel stop?

Only if the fuel stop lies outside the corridor. Add points through the service areas you use, or treat those exits as expected.

Newsletter

Get new posts by email

About one email a month. Product news and practical guides. Unsubscribe any time.

We use your address only to send the newsletter. Privacy policy.

Put your first device on the map today

Book a demo if you would rather see it with your own use case first. Choose a package in the portal; you see the first invoice before you confirm.

Chat with us