linkedin
developer blog

Location referencing and maps

Part 1Part 2  |  Part 3

Wed | 12 Jun 2024 | Developer Blogs

Location referencing
and maps

Location referencing has to do with maps. But what are maps, exactly? In this blog post, you will get a quick introduction into maps: What can maps be used for? And how should they not be used?

Traffic information in your car

Do you know the challenge of describing the exact location of a traffic jam? Your car navigation device receives information from a traffic service. In the messages, the exact locations of incidents are described using location referencing.
Your navigation device relates the incident locations to the route it has planned for you. By matching the locations to its map. For a computer (or a car navigation device), a map is a database. A database that contains all roads and interconnections.
You’re becoming more and more proficient with location referencing! Let’s find out how location referencing and maps work together in you car navigation device.

What is a map, exactly?

A map-database is a repository of roads and interconnections, that contains information about the road network for a whole country, or maybe even the entire world. For each road, the geometry is stored. The geometry describes the shape of the road, as it is on the earth itself. This geometry allows us to visualize the roads on top of a background map.

Below, a very small subset of a map-database is visualized:
links-junctions_map-database_amersfoort

Maps consist of links and junctions

Do you see the green lines? Each green line represents a road segment, between two blue dots. These green little pieces of road are usually called links. Each link has a unique number: The link ID. These are the green numbers.
What about the blue dots? At these points, the links meet. Usually we call these points: junctions. They also have a unique number: The junction ID. These are printed in blue, next to the blue dots.
These links and junctions are important! They are at the basis of almost everything you can do with a map. For example, when your car navigation device is planning a route for you, it can only find one, using these links and junctions.

Use maps wisely

Now you know how maps work, we could try to describe locations, using link IDs. If I knew the location of a traffic jam, I could look up the link IDs in my own map, and give you the numbers. You could then use your own map, to look up the link IDs, and you knew the exact location of this traffic jam. No problem, right?

I have prepared a little map for you, which you can use to look up the links. This map visualizes the links of a map-database, provided by NWB version 2015. The NWB (Nationaal Wegen Bestand) our Dutch national roads file maintained by Rijkswaterstaat, the Dutch Highway Agency.

Below are the link IDs. Can you find the location of the traffic jam?

  • 160287250
  • 160287251

You can’t? Why not? There are no links with the IDs I gave you!? What’s wrong?

Maps differ

Ehm.. I think I made a mistake. Instead of using NWB-2015 (your map) for looking up the link IDs, I used a different one; OpenStreetMap. It looks like this:
Open Street Map of train station area Amersfoort

This map-database is quite different! Different roads are mapped and different link IDs are used. So the link IDs from my map are entirely useless on your map!
I’ll admit: It wasn’t a mistake. It illustrates a very common problem, related to link IDs: Different people, organizations and companies use different maps, which are incompatible.
Which of the two maps is ‘right’? Well, I guess they’re both right. Each map maker produces his or her own representation of the road network. That naturally results in different maps.

Maps change

There is another problem associated with link IDs: Different versions of the same map are also incompatible. Below is an example, also based on NWB, but from 2010 instead of 2015, so this little map is five years older than the NWB map I first showed you:
NWB 2010 map of train station area in Amersfoort

This one is also completely different! Many links from NWB-2010 in this area are not present in NWB-2015 anymore. Also, there are many links in NWB-2015 that did not yet exist in NWB-2010.

These version differences can also have a big impact. Let’s say there is a company, that has lots of data stored, using link IDs of NWB-2010. Then, at some point, they want to upgrade to NWB-2015. If they do not have a method available to automate this upgrade, they will have to do all the work by hand. As a map could easily contain millions of links, doing all the checking and mapping by hand is months of work.

We need location referencing

This is where Location Referencing comes in. Link IDs are unsuitable for communicating and storing locations. Because maps are different, and because maps change. Using a location referencing method, you can overcome these problems.

How is that even possible? I could use a piece of software called an encoder, to translate my link IDs to a location reference, using my map-database (OpenStreetMap). The location reference (for example, in OpenLR, a location referencing method developed by TomTom, donated as a free software project to the open source community) then describes the location of the traffic jam, in a way that is map-independent. You could then use a decoder to find the corresponding map links on your map (NWB-2015).
Encoding and decoding map links with location referencing

Please note that a location reference is very different from the associated map links. A location reference relates to map links, as a blueprint would relate to a building. The blueprint describes a building, but it is not the building itself. Analogous: A location reference describes a location, but it is not the location itself.

To get back to encoding and decoding: Drawing a blueprint from an existing building, would compare to encoding map links to a location reference. Decoding this location reference on different map, then compares to building a another building, according to this blueprint.

Never use link IDs as location reference

In this blog post, you learned what maps consist of and how location referencing relates to maps. Then, I explained why link ids should not be used as location reference. It might seem temptingly harmless at first sight. But it becomes a big problem over time when map versions change or traffic information is conveyed to others who use another map.

Problems related to storing or providing data using link IDs, can usually be solved by implementing some form of location referencing. Do you feel you need help? Perhaps Simacan can be of assistance.

Read more on location referencing in part 1 and part 2 of Jeroen's blogs.