Fleet Management with TomTom Geocoding and Geofencing Services

Developer Portal
Sep 21, 2020 • Last edit on Sep 20, 20229 min read
Open laptop displaying map and code with geofencing alerts

Geocoding is an integral part of working with maps. It refers to taking location information, such as an address, and converting that information to latitude and longitude coordinates, so it can be placed on a map. Reverse geocoding allows these geographic coordinates to be converted into an address that is readable by a person or app.

Geocoding and reverse geocoding are particularly important when working on fleet management solutions, getting goods or people from one location to the other: Think delivery trucks, parcel delivery, and emergency services.

Geofencing lets you define geometric boundaries that simplify keeping track of asset and vehicle location. Instead of tracking potentially thousands of individual object locations, geofences help you translate those locations to defined areas like "inside delivery area 1" or "approaching the main warehouse."

This article covers the major components of geocoding and geofencing and the roles they play in fleet management.

Geocoding in Fleet Management

Let’s consider a grocery delivery scenario. Every day, delivery trucks drive to addresses where people ordered groceries. These addresses, like "123 Main Street," are understood by people and, more importantly, by the delivery driver.

But computers don’t understand this information directly for location and routing purposes. Instead, a mapping program uses latitude and longitude coordinates like 38.8976763,-77.0365298. This may seem problematic to people, but while names of locations may change over time, the geographic coordinates remain constant.

Geocoding is the process of naming these coordinates. So a delivery driver can enter the “123 Main Street” label into a mapping application and get a route to the address. Behind the scenes, the application searches a database for the coordinates associated with “123 Main Street”, gets the coordinates of the current location, and calculates a route between the two.

Geocoding also ensures that when two people are describing a location, they’re talking about the same place. This way, planning can devise routes that drivers can follow.

Geocoding is a key component of fleet management, since it provides both the locations and relative positions of fleet assets in the form of addresses and points of interest (POI) that can be displayed on a map.


Using TomTom Geocoding Services

The TomTom Search API includes a Geocoding service. Search is a RESTful API that allows a single-line fuzzy search for addresses and POIs. Search assigns a latitude/longitude to a specific address, cross street, geographic feature, or POI. You can try out these APIs on the TomTom SearchAPI Explorer page.

The Search API offers multiple modes of search, which allow you to find either one or multiple coordinates or places based on various inputs, like labels and other coordinates.

Fuzzy search, the default, is the form of geocoding probably most familiar to most people. A user or app submits some search terms such as a business name or address. The fuzzy search service returns a list of POIs, addresses, streets, cross streets (intersections), or other geographical locations that turn up as matches for the search query terms. The more specific the query term, the more specific the result is likely to be.

The Geocoding service is more focused. It returns an address based on a (partial) address, but no POIs. For example, “White House” doesn’t return The White House, as with fuzzy search, but does return streets that contain the string “White House”. The geocoding API is very forgiving of typos and incomplete addresses and handles everything from exact street addresses to higher-level geographies such as states and even countries.

TomTom also provides Reverse Geocoding services that provide a Reverse Geocode endpoint and a CrossStreet lookup service.

The Reverse Geocoding endpoint takes a set of coordinates and translates them into a street address or a description of a street element or geography. It will also return the applicable speed limit for this location, something which is particularly valuable to fleet managers.

The CrossStreet lookup endpoint takes a set of coordinates and returns the nearest street intersection, along with defining geographic description including city, state or province, and postal code.

open laptop=

Geofencing Service in Fleet Management

When working with maps, you’ll often want to define certain areas, like the northern and southern parts of a city, specific neighborhoods, traffic corridors, and even individual delivery locations.

Geofencing lets you define virtual boundaries or "fences" around real geographic locations. Geofences are simply geometric areas described by the radius from a given coordinate or a collection of coordinates that define the fenced area.

The TomTom Geofencing API lets you easily define geofenced areas that can be used in conjunction with other TomTom location services. Once you have defined geofences, you can take coordinates and test whether they are inside the fence, near the fence, outside the fence, or have crossed a fence boundary.


The TomTom Location History API uses object coordinates and geofences to enable tracking of assets over time. You can report object locations into the Location History service through a variety of means. For example, you could use the Geocoding service to convert delivery addresses into coordinates and upload them. Or drivers could continuously report their location via a mobile app.

When you have a truck’s position, you can easily see whether it’s in the north or south side of the city, or not in the city at all. Likewise, when you have a delivery address, you can fetch its coordinates using reverse geocoding and instantly see whether the point is in a fenced area.

Check out some use cases with geofencing in the video below.

Fleet Management Apps Using Geocoding and Geofencing

All of these TomTom location services can provide useful building blocks for building your own fleet management applications. Let's look at some possible solutions.

Most deliveries start with an order or a package and a delivery address. Longer routes might include fuel stops, freight hubs, or inspection points. What can you do with this information in an app?

The TomTom Search API and Search and Geocoding services are perfect for turning that address into coordinates, which are crucial to further planning, routing, and analysis actions. The Search API even provides a Batch Search service that lets you synchronously or asynchronously process multiple API requests in a single call, including search and geocoding requests. This is a handy feature for back-end processing in an application that, say, plans the day's deliveries or maps historical trends regarding customer locations.

Once you have coordinates for the stops your fleet needs to make, you'll use the TomTom Routing APIservices to map out their actual routes. The Calculate Route service takes coordinates for a starting point, a destination, and any stops or "waypoints" in between and calculates possible routes. You can optimize those routes based on optional parameters including vehicle and cargo types, preferred road types, and more.

Efficiency is an important part of fleet management, and the Calculate Reachable Range service enables you to determine how far your fleet can go on a route based on configurable vehicle efficiency parameters like Vehicle Consumption (which can specify electric or gas options). Calculate Reachable Range and the Long Distance EV Routing service will be valuable for growing commercial electric vehicle (EV) fleets.

The Routing API also provides Batch Routing and Matrix Routing services that let your application take geocoded coordinates for stops and process multiple routing requests at once. So based just on address data from a CRM database, your application could geocode the addresses and calculate prospective routes behind the scenes. Before the day even begins you can answer important questions like:

  • Do we have a big enough fleet to handle today's business?
  • What are the best routes for our drivers?
  • How many miles are we putting on the fleet?
  • How long does it take to complete our deliveries?
  • Knowing how many miles and hours our fleet is in service, when do we need to schedule maintenance?

Check out the latest version of our Matrix Routing API in the video below!

With the TomTom Geofencing service you can define regions that a vehicle is either outside of, near, or inside of. Rather than tracking individual coordinate locations for your fleet, this is a great feature for application logic that simply needs to know whether a vehicle is in a fence or not — true or false?

Did a vehicle leave the depot on time? Has a vehicle strayed beyond its intended service area? Since you can create and dispose of geofences quickly through the API, it's easy to throw up a fence within, say, a few blocks of a destination or waypoint to send notifications (using the Notifications API) of imminent delivery.

A busy fleet can generate a huge trove of coordinate data: warehouse stops, fuel stops, deliveries, not to mention location tracking information you might capture while the fleet is in transit. Geofences help make sense of that coordinate cloud by breaking fleet locations into geographically identifiable areas.

This is valuable for business analysis applications. Thousands of coordinate points are interesting, but knowing that your fleet spends most of its time in certain neighborhoods might empower decisions about where to position warehouses, and whether investing in an EV fleet makes sense. The Location History API provides services for fleet tracking and fleet position reporting over time.

Next Steps

Geocoding ends up being a foundation location technology for fleet management. Geocoding gives you the base coordinates for customer, destination, and vehicle locations that are used for TomTom Search, Routing, Geofencing, Notification, and Location History APIs.

Combining these TomTom locations allows you to create rich applications that let you manage your fleet in new ways, from tracking vehicles to planning routes, to creating fenced geography for notifications and analysis, to actually driving the most efficient from one place to the next.

To get started building your own TomTom-powered applications, register at

Check out the Asset & Vehicle Tracking use case page for demos, examples, documentation, and more.

Get the developer

No marketing fuff. Tech content only.
Thanks for contacting us

We will reach out to you soon.
Blog cards
tomtom tech news