ov2optimizer - OV2 File Format

OV2 files are binary files containing variable-length records. Information in an OV2 file is either Integer (signed, little-endian) or String (null terminated). Longitudes and latitudes are stored as integers representing the decimal lon/lat value multiplied by 100000, so 118.5 degrees West longitude is stored as -11850000.

The first byte of each record is the Record Type:

0: Deleted POI Record
1: Skipper Record
2: Regular POI Record
3: Extended POI Record

POI Records

For POI records (types 0, 2, and 3), the following 4 bytes contain the Record Length, which is the length of the entire record (including the byte for the Record Type and the 4 bytes for the Record Length). The next 4 bytes contain the Longitude, and the 4 bytes after that contain the Latitude. The remaining bytes represent null-terminated string values (the name of the POI, plus some other string values for Extended POI records).

Record Byte(s) Contents
0 Record Type (0, 2, or 3)
1 through 4 Record Length
5 through 8 Longitude
9 through 12 Latitude
13 through (Record Length - 1) Null-terminated string value(s)

Skipper Records

Skipper records (type 1) are always 21 bytes long. They contain two sets of lon/lat pairs for the North-East and South-West corners of a rectangle, along with a "Block Length". For a given location (say, the current position of the vehicle), if that location falls outside the rectangle then we can just skip the next n bytes of the file.

Record Byte(s) Contents
0 Record Type (1)
1 through 4 Block Length (bytes to skip)
5 through 8 Longitude of NE corner
9 through 12 Latitude of NE corner
13 through 16 Longitude of SW corner
17 through 20 Latitude of SW corner

For an example of how the TomTom device can use these Skipper Records, see How Indexing Helps.