#1495

Hong Kong: its own road marking style

Openglki6wants to merge intofrom

Summary

In Hong Kong every lane line is a 3 m dash with a 9 m gap, 120 mm wide: Hong Kong has no entry in markings.STYLES (db635697, #1005), so it gets the fallback. Britain, Canada and the Netherlands each have a style from their national manual, and Ireland uses Britain's. This PR brings Hong Kong on par with them: a style from the Transport Department's design manual, written as a copy of Britain's with the centre line and the widths changed, the way Canada's is a copy of the US one.

Where the figures come from

The Transport Department's Transport Planning and Design Manual, Volume 3, chapter 5 "Road Markings", August 2026 edition, section 5.4.2 (index of the manual).

LineManualFallback (dev)This PR
Lane line under 70 km/h (RM 1101, table 5.4.2.1)1 m mark, 5 m gap, 100 mm3 / 9 m, 120 mm1 / 5 m, 100 mm in town
Lane line at 70 km/h or more (RM 1102)2 / 7 m, 100 mm3 / 9 m, 120 or 150 mm2 / 7 m, 100 mm out of town and on motorways
Centre line (RM 1103, table 5.4.2.2)3 / 5 m, 100 mm3 / 6 m in town, 6 / 12 m out of it3 / 5 m, 100 mm
Continuous edge line (RM 1109, table 5.4.2.7)100 mm150 mm, 200 mm on motorways100 mm

The lane lines are Britain's (_GB: 1 / 5 and 2 / 7 m). The centre line is Hong Kong's own, one module for every road.

Results

12 places all over Hong Kong: city streets, new towns and village roads, 95 road geotiles. Every roads.extras call of each tile's build was made again with and without the entry; only the lines inside the tile's own box are counted.

devthis PR
Lane dashes5,9139,890
Their mean length, town streets2.9 m1.0 m
Their mean length, out of town3.0 m2.0 m
Centre dashes686837
Their mean length out of town5.9 m3.0 m
Line width120 and 150 mm100 mm
Edge line width150 and 200 mm100 mm

Solid lines keep their place and length: 72.3 km of edge line and 2.3 km of solid lane line in both.

Known limits

  • Town or open land, not the speed limit. The manual picks the lane line by the speed limit. The style is used as Britain's is: lane_urban in town, lane_rural out of it, lane_motorway on motorways. A 70 km/h trunk road in town gets the 1 / 5 m line.
  • Double white lines stay one line, as on dev. Their sizes are in the manual's figures, not its text, and roads.py draws two lines only for yellow centre lines, Sweden and Britain's own style. The give-way line is not changed either.
  • Tunnels keep the fallback style, in every country: roads._tunnel_chunks calls extras without the country. In the test tiles that is 604 lane dashes, 9 % of dev's.
  • More pieces. Shorter dashes are more of them: 67 % more lane dashes in these tiles, the density Britain's style already has.
  • Not seen in the game.

Who this affects

  • Only places whose country is "HK". markings.style returns the same object as before for every other code; a test checks Britain's lines.
  • Cache keys: nothing new; the tiles' code key changes with markings.py as for any change to it.

Validation

  • test_markings passes with a new HongKongTest (4 tests through roads.extras: lane lines, centre line, edge lines, Britain unchanged). On dev's markings.py the three Hong Kong tests fail.
  • test_roads, test_roadcorners, test_roundabouts, test_roadlanes, test_lanesections, test_paintlist and test_blockworker pass.
  • test_determinism.platform_maths finds nothing in markings.py. I have not run the whole suite.

🤖 Generated with Claude Code on Fable 5.2