OpenLR™ - Test data
TomTom provides free map samples as a relational database using SQLite. The table schema is a simple design of three tables (directed LINES, NODES, METADATA) and is illustrated in the following picture. Note: The GEOM blob contains the shape of a line in WKB format (well known binary).

SQLite table schema
Available map samples include the following areas and map releases:
- Area around Utrecht, The Netherlands (2008.04 map release)
- Area around Utrecht, The Netherlands (2007.07 map release)
The differences between the two map releases in the Utrecht area are outlined in the following animated picture.
Access to the map samples is governed by a "click-through"
Evaluation License Agreement.
Download
(a new window with the Evaluation License will open)
Map sample access
Two supplementary software packages are provided for a test implementation of the four OpenLR™ software packages to work with the free map samples: Database Access Layer and Command Line Interface.Database Access Layer
TomTom provides a Java library called "OpenLR Access Layer for SQLite" which enables the OpenLR™ en-/decoder components to use TomTom Digital Maps for location referencing. The map data must be stored in a SQLite database which complies to the above illustrated schema. This package includes the implementation of the map loader interface which is required to visualize the map in the MapViewer tool.The implementation uses Java version 6 (see http://java.sun.com) and is licensed under the terms of the GNU General Public License, version 2 (see http://www.gnu.org/licenses/gpl-2.0.html).
The "map sqlite" library makes use of several other libraries and therefore we recommend to use the "with-dependencies" package where all required libraries are included.
| Database Access Layer | |
|---|---|
| Provided for accessing the map samples | tt-sqlite-1.3.0.jar tt-sqlite-1.3.0-javadoc.jar tt-sqlite-1.3.0-sources.jar tt-sqlite-1.3.0-with-dependencies.jar |
Command Line Interface
In addition to the database access layer TomTom provides a utility which enables users to use the OpenLR™ en-/decoder components in conjunction with the "OpenLR Access Layer for SQLite" library using an easy-to-use command line interface. It provides the possibility to encode locations, described by a comma separated list of IDs (and optional offsets), to location references in readable Base64 format and vice versa. Furthermore the utility is able to create KML files visualising the location/location reference.The "cli sqlite" library makes use of several other libraries and therefore we recommend to use the "with-dependencies" package where all required libraries are included.
| CLI | |
|---|---|
| Utility for using maps samples & database access layer together with the OpenLR™ software package |
cli-sqlite-1.2.2.jar cli-sqlite-1.2.2-javadoc.jar cli-sqlite-1.2.2-sources.jar cli-sqlite-1.2.2-with-dependencies.jar |
Examples
The following examples show the usage of the "Command Line Interface" tool.
Example 1 shows a location which consists of three lines (see Map IDs) in the 2008.04 release of the map around Utrecht (The Netherlands). The result of the OpenLR™ encoding is Base64-encoded. This location reference was decoded on the same map and the result is shown in the KML output file. If you want to replay this example you can use the provided command line.
| Example 1 | |
|---|---|
| Location (Map IDs) |
15280001229524,15280001349498,-15280001349500 |
| Location Reference (Base64-encoded OpenLR binary) |
CwOiYCUMoBNWAv9P/+MSBg== |
| KML file | Download |
| Command line | java -jar
cli-sqlite-1.2.2-with-dependencies.jar -m tomtom_utrecht_2008_04.db3 -i "L;ID;0,0,15280001229524,15280001349498,-15280001349500" -if LOCATION_STRING -of BINARY64 -k openlr-example-01.kml |
Example 2 illustrates the case of different maps. The location in the encoder map (area around Utrecht, 2008.04 map release) consists of six lines. The location reference was decoded on the map release 2007.07 and results in a location of nine lines. The KML output file shows a comparison of this location. If you want to replay this example you can use the provided command line.
| Example 2 | |
|---|---|
| Location (Map IDs, 2008.04 map release) |
15280049399532, 15280049399523, 15280049399521, -15280002764570, -15280049399525, -15280002736845 |
| Decoded location (Map IDs, 2000.07 map release) |
15280049343797, 15280002736803, 15280002764569, -15280002764567, 15280002764532, 15280002736874, 15280002736875, -15280002736845, -15280002736844 |
| Location Reference (Base64-encoded OpenLR binary) |
CwObNyUKhxuCFv3GA/YjblgR |
| KML file | Download |
| Command line |
Encoding: java -jar cli-sqlite-1.2.2-with-dependencies.jar -m tomtom_utrecht_2008_04.db3 -i "L;ID;0,0,15280049399532,15280049399523,15280049399521, -15280002764570,-15280049399525,-15280002736845" -if LOCATION_STRING -of BINARY64 -k openlr-example-encoded.kml Decoding: java -jar cli-sqlite-1.2.2-with-dependencies.jar -m tomtom_utrecht_2007_07.db3 -i "CwObNyUKhxuCFv3GA/YjblgR" -if BINARY64 -of LOCATION_STRING -k openlr-example-decoded.kml |


