Skip to content

Commit e3b8893

Browse files
authored
feat(profiles): add support for surface=laterite in car and bicycle profiles (#7644)
* feat(profiles): add support for surface=laterite in car and bicycle profiles Add surface=laterite to car (15 km/h) and bicycle (5 km/h) profile speed tables. Laterite roads are common in tropical areas and exhibit extreme traction loss when wet - the OSM wiki recommends a significantly higher penalty than dirt or clay. The chosen speeds place laterite between clay and earth for cars, and between earth and mud for bikes. Includes cucumber test coverage for routability and speed reduction. * fix(profiles): reorder laterite in descending speed order; add to taginfo.json Move laterite=15 to between sand=20 and mud=10 so the surface_speeds table maintains descending numeric order. Add laterite to taginfo.json surface value enumeration.
1 parent 32ff369 commit e3b8893

5 files changed

Lines changed: 10 additions & 2 deletions

File tree

features/bicycle/surface.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Feature: Bike - Surfaces
2626
| cycleway | grass_paver | 120 s |
2727
| cycleway | dirt | 90 s |
2828
| cycleway | earth | 120 s |
29+
| cycleway | laterite | 144 s |
2930
| cycleway | grass | 120 s |
3031
| cycleway | mud | 240 s |
3132
| cycleway | sand | 240 s |

features/car/surface.feature

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Feature: Car - Surfaces
3333
| trunk | asphalt | x |
3434
| trunk | sett | x |
3535
| trunk | gravel | x |
36+
| trunk | laterite | x |
3637
| trunk | ice | x |
3738
| trunk | snow | x |
3839
| trunk | nonsense | x |
@@ -90,6 +91,7 @@ Feature: Car - Surfaces
9091
| motorway | no | tartan | 40 km/h +-1 | 40 km/h +-1 |
9192
| motorway | no | cobblestone | 30 km/h +-1 | 30 km/h +-1 |
9293
| motorway | no | clay | 30 km/h +-1 | 30 km/h +-1 |
94+
| motorway | no | laterite | 15 km/h +-1 | 15 km/h +-1 |
9395
| motorway | no | earth | 20 km/h +-1 | 20 km/h +-1 |
9496
| motorway | no | stone | 20 km/h +-1 | 20 km/h +-1 |
9597
| motorway | no | rocky | 20 km/h +-1 | 20 km/h +-1 |
@@ -124,8 +126,9 @@ Feature: Car - Surfaces
124126
| motorway | no | | | | 90 km/h |
125127
| service | no | grade1 | asphalt | excellent | 15 km/h |
126128
| motorway | no | grade5 | asphalt | excellent | 20 km/h |
127-
| motorway | no | grade1 | mud | excellent | 10 km/h |
128-
| motorway | no | grade1 | asphalt | very_horrible | 5 km/h |
129+
| motorway | no | grade1 | mud | excellent | 10 km/h |
130+
| motorway | no | grade1 | laterite | excellent | 15 km/h |
131+
| motorway | no | grade1 | asphalt | very_horrible | 5 km/h |
129132
| service | no | grade5 | mud | very_horrible | 5 km/h |
130133

131134
Scenario: Car - Surfaces should not affect oneway direction

profiles/bicycle.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ function setup()
199199
ground = 10,
200200
dirt = 8,
201201
earth = 6,
202+
laterite = 5,
202203
grass = 6,
203204
mud = 3,
204205
sand = 3,

profiles/car.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ function setup()
274274
rocky = 20,
275275
sand = 20,
276276

277+
laterite = 15,
278+
277279
mud = 10,
278280

279281
-- winter surfaces (OSM surface=ice / surface=snow)

taginfo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
{"key": "surface", "value": "cobblestone"},
291291
{"key": "surface", "value": "clay"},
292292
{"key": "surface", "value": "earth"},
293+
{"key": "surface", "value": "laterite"},
293294
{"key": "surface", "value": "stone"},
294295
{"key": "surface", "value": "rocky"},
295296
{"key": "surface", "value": "sand"},

0 commit comments

Comments
 (0)