Specification of the roads.csv file
The road data will be in a roads.csv file, which is a CSV (Comma-Separated Values) file.
Each line will follow the format outlined below.
There will be no quotes in the CSV file, because there won't be any commas, newline or null characters inside the CSV fields: any comma is a field separator, and any newline character '\n'
is a line separator.
All fields will be set -- there will be no empty field.
CSV Spec: name, priority, maxspeed, oneway, numpoints, lat0, lng0, lat1, lng1, lat2, lng2, ..., lat_numpoints-1, lng_num_points-1
-
name: The road name, eg "Rue du petit Cerisier". There will be no commas "," in the name.
-
priority: an integer taking one of the following values. Road priorities are a bit fuzzy.
-
0 = national highway, i.e. Autoroute (eg. "A12")
- 1 = highway. Typically, each direction of travel has more than one lane, and the two directions of travel are split by an uncrossable center barrier.
-
2 = national/regional road (eg. Nationale)
-
3 = inter-communal road (eg. Departementale)
-
4 = local road, where each direction of travel has at least one dedicated lane (can be a one-way, single-lane road)
-
5 = two-way narrow road with a single lane that must be shared by the two directions of travel, i.e. cars have to almost stop to cross each other.
-
6 = private road or cul-de-sac
-
max_speed: an integer: the maximum allowed speed on that road, in km/h (kilometers per hour).
-
num_lanes: an integer, eg. "3": the number of lanes of the road (adding both directions if they have separated lanes). It can take the special value 0 to say "unknown".
-
oneway: an integer, 0 or 1:
-
0 = the road is two-way: cars can travel in both directions
-
1 = the road is one-way: cars can only go in the direction given by the road's polyline.
-
numpoints: an integer >= 2, the number of points of the road polyline.
There will be exactly numpoints latitude and longitude following this field.
-
lat0, lng0 (2 fields): floating point numbers: the latitude and longitude of the first point of the road polyline, in degrees.
- latitudes must be in [-90, 90]
- longitudes must be in [-180, 180[
-
lat1, lng1: ditto, for the second point of the road polyline.
-
... and so on for a total of num_points pairs of lat,lng fields.
Important: Roads will be considered connected to each other when they share a point with the
exact same position.
1-line Example:
rue Ventadour,4,1,50,1,3,48.8666,2.3340,48.8667,2.3343,48.8673,2.3346
The total number of fields will always be equal to (6 + 2*num_points).