Location data file format

The location data file is map-dependent and the locations can only be loaded in combination with the original map. This formats makes it easier to store (map-dependent) test data so that tests can be repeated based on the same test set. Tha data package provides methods for reading and writing location data files.

The format is text-based and each line stands for one location. Comments starts with a "#" symbol and all characters after that symbols will be ignored. All location types can be mixed and empty rows will be ignored. The following paragraph shows an example file containing 4 locations.

#TomTom map, Utrecht, 2007.07
LIN;1;0,0,-15280001229187,-15280001229188,-15280001229189
GEO;2;5.102695171523532,52.10558008898415
PAL;3;-15280001229187,25,0,0
POI;4;15280001229305,95,5.101705912928146,52.10552189730207,1,3
CIR;5;5.102974491597523,52.10606889911364,100
REC;6;5.101316084476455,52.10550389176626,5.104404736782334,52.107166313448545
GRI;7;5.100707438286767,52.10564015583858,5.102410739190745,52.106752979095845,2,2
POL;8;5.1010617248747945,52.10528586925055,5.100861870902061,52.10706638646218,5.102696893742613,52.10783854953865,5.10377792204967,52.106603088616296,5.103378214104204,52.10525861643609
CLL;9;-15280001229314,15280001229304,15280001229188,15280001229187,15280001229330,15280001229331,-15280001229313

The first row of the example is a comment describing which map has been used to create the locations file.

All location lines are divided into three parts. The symbol ";" is the separator between these different parts. The first part contains an identifier for the location type.

Location type identifier:

  • LIN: line location
  • GEO: geo-coordinate location
  • PAL: point along line location
  • POI: POI with access point location
  • CIR: circle location
  • REC: rectangle location
  • GRI: grid location
  • POL: polygon location
  • CLL: closed line location
The second part contains an ID which should be unique across that location file. There will be no check if the ID is unique and it might happen that only one location whose id is not unique will be recognized.

The third part uses the symbol "," as separator and depends on the location type:

Line location:
The first column identifies the positive offset, followed by the negative offset and the remaining data consists of all line ids forming the line location. The order of the lines is from start to end.

Geo coordinate location:
The first column identifies the longitude value and the second column identifies the latitude value. Both values are measured in degrees.

Point along line location:
The first column contains the line id, followed by the positive offset value. The third and forth column identify the side of road and orientation values.

POI with access point location:
The first column contains the line id, followed by the positive offset value. The third and forth column identify the longitude and latitude values of the point of interest and the remaining columns identify the side of road and orientation values.

Circle location:
The first and second columns contain the longitude and latitude value of the center point. The last column gives the radius in meter.

Polygon location:
The data gives a sequence of longitude and latitude values. Each pair of lon/lat defines a corner point of the polygon. The corner points are ordered.

Rectangle location:
The first column gives the longitude value of the lower left coordinate. The second column gives the latitude value of the lower left coordinate. The third column gives the longitude value of the upper right coordinate. The fourth column gives the latitude value of the upper right coordinate.

Grid location:
The first column gives the longitude value of the lower left coordinate. The second column gives the latitude value of the lower left coordinate. The third column gives the longitude value of the upper right coordinate. The fourth column gives the latitude value of the upper right coordinate. The fifth column identifies the number of rowas and the last column identifies the number of columns of the grid.

Closed line location:
The data consists of all line ids forming the closed line location. The order of the lines is from start to end.