By the RAAD team
Route-based geofences built faster with KML files
Listen to this article
Route-based geofences are virtual corridors drawn along a real route instead of around a fixed place. They tell you whether each vehicle stayed on its approved path, skipped a segment or took a detour. With KML files, the setup takes minutes. Hand-drawing the same corridor takes hours.
What route-based geofences are for
A route corridor answers a question a static zone cannot: did the vehicle take the path we approved, or not? A geofence is a virtual boundary on a map that records an event when a vehicle enters it, leaves it or waits inside it. Most are circles or polygons around fixed places such as depots, customer sites and restricted yards. A route corridor wraps the boundary around the route itself, so the system watches the whole length of the journey rather than only the endpoints.
| Static geofence | Route corridor | |
|---|---|---|
| Question it answers | Was the vehicle at this place? | Did the vehicle follow this path? |
| Shape | Circle or polygon around a fixed point | A band that follows the route line |
| Best for | Depots, customer sites, restricted zones | Planned routes, service checks, compliance |
| Weakness | Says nothing about the path between places | Needs rebuilding whenever the route changes |
The corridor also creates a record of what actually happened on the road. When a customer questions whether a service stop took place, or a route is reviewed after an incident, or two teams disagree about the sequence of events, the entry and exit events along the corridor are the objective account, and nobody has to argue from memory.
A record like that only earns its keep if it is cheap to create. Drawing a corridor that follows every bend in a full day of driving is slow, and across a large fleet, with routes that change often, it stops being sustainable. The route data already sits in your tracking system. The trick is to reuse it.
KML files, in plain terms
KML is the standard file format that connects the route a vehicle actually drove with the boundary your fleet system can enforce. KML stands for Keyhole Markup Language, and it stores points, lines and areas as text that mapping tools and fleet systems read consistently. A route saved as KML opens in common mapping applications, can be checked visually, and can be shared with a partner or customer without losing detail, so everyone works from the same geometry instead of a simplified version.
Turning a real route into a monitored corridor follows five steps:
- Let the vehicle drive its normal day while the tracking system records the trip.
- Save the route geometry as a KML file.
- Clean the file: remove the stop points and merge the separate segments into one continuous line.
- Import the cleaned file and treat it as a corridor rather than a line on a map.
- Attach rules so leaving the corridor raises an alert, and schedule reports if you need the detail in writing.
Step three is where most of the effort hides, and where most of the time is saved.
Cleaning a KML file before import
A raw KML export of a real route usually imports as a mess, because stops and gaps break one journey into many fragments. A vehicle's day is rarely one continuous line: it waits at gates, sits at customer premises and parks with the ignition off, and the tracking system marks those moments as points. Import the file untouched and the system does its job too literally. Every stop becomes its own small geofence, and the route arrives as a scatter of disconnected segments that each need naming, linking and rule-setting. What should be one operational object becomes dozens.
Three parts of a KML file matter here:
- A Placemark is the container that holds one map feature, such as a route or a stop.
- A LineString is a route, expressed as an ordered sequence of coordinates.
- A Point is a single location, such as a stop.
Cleaning the file means extracting every coordinate from the LineStrings, deleting the Points, and merging the coordinates into one continuous LineString inside one Placemark. The result imports as a single selectable corridor that can trigger entry and exit alerts along its entire length.
Doing this by hand demands a working knowledge of the file structure and patience that rarely survives a busy week. The task is mechanical, which is why it automates well. A short script, or an AI assistant given those three instructions, returns the cleaned file in minutes; nothing new is invented, because the geometry is still exactly what the vehicle drove.
Limits to plan around
The KML workflow is dependable inside known boundaries and frustrating outside them, so learn the boundaries before rolling it out. Three matter most:
- Route length. A single day of driving processes cleanly. Push to multi-day routes and the results become inconsistent, so process each day as its own corridor.
- Point count. Fleet systems cap how many points one geofence may hold, and tracking data is dense: a device reporting every few minutes generates thousands of coordinates a day. Long routes may need simplification or splitting into segments.
- Tool limits. Whatever cleans the file, a script, an AI service or a mapping tool, has its own ceilings on file size and processing time. Prove the workflow on one route before applying it across the fleet.
Where route corridors fit in RAAD
In RAAD, route monitoring is one part of an estate that already holds the map, the trips, the rules and the paperwork. Track puts the live map, trip and stop history, geofences and rules in one place, on the hardware you already run, which means the route a vehicle drove yesterday is already sitting in trip history as the raw material a corridor needs. Nothing has to be redrawn from memory. When a vehicle leaves its corridor, the rule fires and the alert lands attached to the trip it belongs to.
Corridors can be chatty in their first week, while real driving habits and imperfect geometry argue with each other. AI Insights reads every alert, holds back what does not need a person, and brings the rest with a reason and a proposed fix, so a noisy corridor becomes a tuning exercise rather than an inbox problem. Nothing touches a vehicle until someone approves it. That approval step also protects you from your own mistakes: if you draw a corridor badly, you get a conversation, and the vehicles keep driving as they were.
Detours burn fuel as well as time. Because Power keeps fuel and energy on the same estate as tracking, the fuel picture for the day a vehicle wandered sits next to the trip that explains it. And when a route changes, the quickest way to a new corridor is the next day's trip: drive it, clean it, import it.
Inside those boundaries, a route corridor turns data you already collect into an enforceable control. The route itself becomes the boundary. A deviation arrives as an alert with its trip attached, and an argument about what happened on the road becomes a lookup rather than a debate.
Common questions
Why did my KML import become dozens of small geofences?
The file contained stop points and gaps, and the fleet system turned each one into its own object. Clean the file first: drop the Points, merge the LineStrings into one continuous route, then import it.
How long a route can one corridor cover?
A full day of driving is the comfortable limit. Multi-day routes process inconsistently and may hit point caps, so split longer routes into daily or leg-based corridors with consistent names, which keeps reports readable.
Do corridors replace geofences around places?
No. Corridors watch the path; circles and polygons around depots, customer sites and restricted zones still answer whether a vehicle was at a place and how long it waited. Most operations run both side by side.
One platform for every connected asset
Tracking, power, cameras, metering and compliance in one console — resold under your own brand and billed by you.
Explore the RAAD platform

