Tunnel mapping
Mapping tunnels presents a particular challenge, as the main sources of reference, namely GPS and aerial imagery, are not available here. Here are some techniques to get the most accurate representation of a tunnel and the features within it.
Cadastral maps
If cadastral maps are available under a license that allows inclusion in OSM, use those by all means. They should provide the best quality. The other methods may still be useful to map features in tunnels which are not covered by the cadastral map.
Overground features
Many tunnels have features which are visible overground, and thus appear on aerial imagery, or can be mapped using conventional GPS techniques. The most obvious ones are the portals.
Some tunnels also have ventilation shafts whose overground structures are easy to spot. Be aware, however, that not all shafts are perfectly vertical. The Fréjus Road Tunnel (between Modane, France, and Bardonecchia, Italy) and the San Bernardino Tunnel (GR, Switzerland) are known to have ventilation shafts whose overground structures are several hundred meters from the tunnel.
Some tunnels also provide underground indication of ventilation shafts. For example, the San Bernardino Tunnel has niches where the ventilation shafts (Aria and Sasso) end, with the name indicated on the wall. The Arlberg Road Tunnel (between Langen and St. Anton, Austria) has an emergency shelter in proximity of each ventilation shaft. This gives you an overground and an underground landmark to correlate—but again, be aware that the ventilation shafts may not be perpendicular to the tunnel.
Sometimes you can infer the course of the road from imagery: Sometimes the road does not disappear underground right at the tunnel portal, but the first few meters of the tunnel may still be visible from above the ground. If the tunnel portal is in a bend in the road, you can use the overground part of the road to get an idea of the curve radius inside the tunnel.
Dead reckoning
To this date, no integrated solution for dead reckoning (inferring coordinates from the last GPS measurement as well as sensor data) seems to exist. Even so, errors accumulate quickly with dead reckoning, and your estimates may be significantly off at the end of a long tunnel. At the very least, take two measurements, one in each direction, and average between them.
Also, be aware that smartphone compasses typically have poor accuracy, and the presence of several magnetic fields in the car itself does not help. For this reason, smartphone compasses are notoriously unreliable.
Distance measurements
A simple way to locate features is by measuring distance from tunnel portals. This can be done with the odometer of a car, or by examining markers, milestones or distance indications on the tunnel walls. Odometer measurements typically constrain you to a resolution of 100 m, so don’t expect accuracies greater than that from a single measurement; make two measurements in opposite directions for better accuracy. This works especially well if you want to add features to an already well mapped tunnel.
The same technique can also be used to determine how long the curves and straight sections of the tunnel are.
For verification, compare the length of the tunnel (as indicated on road signs) to the length of the way in OSM. Assuming that the distance on signs is accurate (indications often have resolutions of 1 or 5 meters): if the tunnel in OSM is shorter than it should be (according to traffic signs), you may have drawn it straighter than it is in reality. If it is longer, you may have ovrdrawn the tunnel and it is in fact straighter.
Bearing estimates
If you know how many curves the tunnel has, and how long they are, but you do not know the curve radii, you can estimate the bearing of the straight stretches in between. This assumes that all curves have equal radii, which may work for slight bends, but errors may get large for longer curves.
- Determine the bearing just before entering one portal, and just after leaving the other. Determine the difference.
- Sum up the length of curves in each direction, then calculate the difference between combined left and right turn lengths.
- Divide the bearing difference (between entry and exit) by the length balance, which will give you the change in bearing per meter of curve.
- Now you can calculate how much the bearing of the road approximately changes after each curve.
Video analysis
If you have a dashcam video of an entire trip through the tunnel, you can infer the road geometry remarkably well. Here are some techniques:
Counting markers
Most tunnels these days have marker lights on the walls or on the kerb, placed at an even distance. Figure out the distance between marker lights, then count marker lights to estimate distances. Bear in mind that sometimes marker lights are missing, such as in emergency bays.
Some tunnels have different marker types: For example, the Fréjus tunnel has white lights every 20 m and blue lights every 160 m.
Estimating curve radii
You can use markers or other distance indicators to estimate the radius of a curve: When you are at the beginning of a curve, count how many markers you can see on the outside wall until they start disappearing behind the inside wall, and calculate the distance.
When you have a known curve radius, such as at the portal, use that as a reference. Count how many markers you can see there, and determine the curve radius from the visible portion. For any other bend: the more markers you can see, the bigger the curve radius. Assuming that it is proportional (i.e. n times the mumber of markers visible means n times the curve radius) should be a sufficient approximation.
Without a known reference, assume the following: When you have travelled the distance at which the outside tunnel wall is no longer visible, you have diverted the equivalent of the tunnel’s width from a straight line of the same distance (in fact a shorter distance, but that is near-negligible here). A two-lane road tunnel is some 9–10 m wide.
In JOSM, draw an auxiliary line with the same bearing as the stretch of road before, and a length corresponding to the visible distance. Draw another auxiliary line from its end point, perpendicular to it and pointing towards the inside of the bend, with a length that corresponds to the tunnel width. Connect the beginning of the first auxiliary line with the end of the second one: this is the stretch of road. Continue for the length of the bend.