Skip to content

Commit bb0331b

Browse files
k-ylehiddewie
andauthored
add Australian signals (NSW, part 1) (#642)
This PR adds all light signals for New South Wales (Australia), except `main` and `distant`, because those two are more complicated, like [the italian system](#639). See [the osmwiki page](https://osm.wiki/Australian_Tagging_Guidelines/Railway_Signals#NSW) for details. In Australia, there can be up to 6 `train_protection` signals on a single pole ([example](https://wiki.openstreetmap.org/wiki/File:NSW_Railway_Signal_full_example.jpg)), so we need to increase the limit from 5 to 6. <img width="112" height="136" alt="image" src="https://github.com/user-attachments/assets/1d6fdfe7-2852-4a07-a5ee-ab20996aaa16" /> <img width="71" height="97" alt="image" src="https://github.com/user-attachments/assets/90b04dff-5b99-41ca-98eb-c2cb33a7532a" /> <img width="78" height="102" alt="image" src="https://github.com/user-attachments/assets/cf86a095-2a3d-420a-9691-89ef66151066" /> <img width="204" height="169" alt="image" src="https://github.com/user-attachments/assets/4bd2fffa-1cf4-4075-9387-627f353ccb78" /> <img width="92" height="125" alt="image" src="https://github.com/user-attachments/assets/347fca1c-96c6-43e8-972d-41cd280ab506" /> <img width="172" height="212" alt="image" src="https://github.com/user-attachments/assets/53ab6a1f-48c1-4fc3-8d4a-ce744e3b7df7" /> <img width="47" height="82" alt="image" src="https://github.com/user-attachments/assets/d59126bd-0170-46e8-9686-b5158bbae3cb" /> <img width="101" height="98" alt="image" src="https://github.com/user-attachments/assets/5a82cbfe-bb11-4fdd-8823-eba239b25a98" /> <img width="134" height="154" alt="image" src="https://github.com/user-attachments/assets/8492f134-302c-4d73-9376-77fd261130ac" /> <img width="80" height="60" alt="image" src="https://github.com/user-attachments/assets/27e5cbc3-a8d7-43e0-bc41-97247db5ae83" /> <img width="94" height="116" alt="image" src="https://github.com/user-attachments/assets/f1859e73-bf34-4bf7-87d4-b2ad1cb03086" /> <img width="103" height="181" alt="image" src="https://github.com/user-attachments/assets/eb3b1009-6d85-440d-b860-9710f0f8791f" /> <img width="94" height="100" alt="image" src="https://github.com/user-attachments/assets/3322407b-a0aa-4963-8edb-4d2c89efa6aa" /> <img width="80" height="93" alt="image" src="https://github.com/user-attachments/assets/f5bff291-08b6-4690-b8c6-2583956d9014" /> <img width="82" height="114" alt="image" src="https://github.com/user-attachments/assets/177f9185-21b4-4462-8aec-70e35deaf0b4" /> Co-authored-by: Hidde Wieringa <[email protected]>
1 parent e7334be commit bb0331b

34 files changed

+461
-0
lines changed

features/signals_railway_signals.yaml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,23 @@ tags:
113113
- { tag: 'railway:signal:route:deactivated', title: 'Route deactivated', type: boolean }
114114
- { tag: 'railway:signal:route_distant', title: 'Route distant' }
115115
- { tag: 'railway:signal:route_distant:form', title: 'Route distant form' }
116+
- { tag: 'railway:signal:route_distant:shape', title: 'Route distant shape' }
116117
- { tag: 'railway:signal:route_distant:states', title: 'Route distant states', type: array }
117118
- { tag: 'railway:signal:route_distant:deactivated', title: 'Route distant deactivated', type: boolean }
118119
- { tag: 'railway:signal:short_route', title: 'Short route' }
119120
- { tag: 'railway:signal:short_route:form', title: 'Short route form' }
121+
- { tag: 'railway:signal:short_route:shape', title: 'Short route shape' }
120122
- { tag: 'railway:signal:short_route:deactivated', title: 'Short route deactivated', type: boolean }
121123
- { tag: 'railway:signal:shunting', title: 'Shunting' }
122124
- { tag: 'railway:signal:shunting:form', title: 'Shunting form' }
123125
- { tag: 'railway:signal:shunting:states', title: 'Shunting states', type: array }
126+
- { tag: 'railway:signal:shunting:shape', title: 'Shunting shape' }
124127
- { tag: 'railway:signal:shunting:height', title: 'Shunting height' }
125128
- { tag: 'railway:signal:shunting:deactivated', title: 'Shunting deactivated', type: boolean }
129+
- { tag: 'railway:signal:shunting_route', title: 'Shunting Route' }
130+
- { tag: 'railway:signal:shunting_route:form', title: 'Shunting Route form' }
131+
- { tag: 'railway:signal:shunting_route:states', title: 'Shunting Route states', type: array }
132+
- { tag: 'railway:signal:shunting_route:deactivated', title: 'Shunting Route deactivated', type: boolean }
126133
- { tag: 'railway:signal:snowplow', title: 'Snowplow' }
127134
- { tag: 'railway:signal:snowplow:form', title: 'Snowplow form' }
128135
- { tag: 'railway:signal:snowplow:type', title: 'Snowplow type' }
@@ -196,6 +203,7 @@ types:
196203
- { type: minor_distant, layer: signals }
197204
- { type: passing, layer: signals }
198205
- { type: shunting, layer: signals }
206+
- { type: shunting_route, layer: signals }
199207
- { type: radio, layer: signals }
200208
- { type: stop, layer: signals }
201209
- { type: stop_distant, layer: signals }
@@ -1218,6 +1226,202 @@ features:
12181226
- { tag: 'railway:signal:station_distant', value: 'AU:NSW:YL' }
12191227
- { tag: 'railway:signal:station_distant:form', value: 'sign' }
12201228

1229+
# --- AU-NSW-signals --- #
1230+
1231+
# shunt
1232+
- description: Shunt Signal
1233+
country: AU
1234+
icon:
1235+
match: 'railway:signal:shunting:shape'
1236+
cases:
1237+
- { exact: 'vertical', value: 'au/nsw/signals/shunt_vertical' }
1238+
default: 'au/nsw/signals/shunt_box'
1239+
tags:
1240+
- { tag: 'railway:signal:shunting', value: 'AU:NSW:shunt' }
1241+
- { tag: 'railway:signal:shunting:form', value: 'light' }
1242+
1243+
- description: Intermediate Shunt Signal Signal
1244+
country: AU
1245+
icon:
1246+
match: 'railway:signal:shunting:shape'
1247+
cases:
1248+
- { exact: 'vertical', value: 'au/nsw/signals/shunt_vertical_int' }
1249+
default: 'au/nsw/signals/shunt_box_int'
1250+
tags:
1251+
- { tag: 'railway:signal:shunting', value: 'AU:NSW:intermediate' }
1252+
- { tag: 'railway:signal:shunting:form', value: 'light' }
1253+
1254+
- description: Facing Points Indicator
1255+
country: AU
1256+
icon: { default: 'au/nsw/signals/points_indicator_facing' }
1257+
tags:
1258+
- { tag: 'railway:signal:switch', value: 'AU:NSW:facing_points' }
1259+
- { tag: 'railway:signal:switch:form', value: 'light' }
1260+
1261+
- description: Trailing Points Indicator
1262+
country: AU
1263+
icon: { default: 'au/nsw/signals/points_indicator_trailing' }
1264+
tags:
1265+
- { tag: 'railway:signal:switch', value: 'AU:NSW:trailing_points' }
1266+
- { tag: 'railway:signal:switch:form', value: 'light' }
1267+
1268+
# repeaters
1269+
- description: LED Repeater
1270+
country: AU
1271+
icon: { default: 'au/nsw/signals/LED_repeater' }
1272+
tags:
1273+
- { tag: 'railway:signal:main_repeated', value: 'AU:NSW:LED_repeater' }
1274+
- { tag: 'railway:signal:main_repeated:form', value: 'light' }
1275+
1276+
# other
1277+
- description: End of Track
1278+
country: AU
1279+
icon: { default: 'au/nsw/signals/end_of_track_R' }
1280+
tags:
1281+
- { tag: 'railway:signal:stop', value: 'AU:NSW:end_of_track' }
1282+
- { tag: 'railway:signal:stop:form', value: 'light' }
1283+
- { tag: 'railway:signal:stop:states', value: 'R' }
1284+
1285+
- description: End of Track
1286+
country: AU
1287+
icon: { default: 'au/nsw/signals/end_of_track_WR' }
1288+
tags:
1289+
- { tag: 'railway:signal:stop', value: 'AU:NSW:end_of_track' }
1290+
- { tag: 'railway:signal:stop:form', value: 'light' }
1291+
- { tag: 'railway:signal:stop:states', value: 'WR' }
1292+
1293+
- description: Guards Indicator
1294+
country: AU
1295+
icon: { default: 'au/nsw/signals/guards_indicator' }
1296+
tags:
1297+
- { tag: 'railway:signal:main_repeated', value: 'AU:NSW:guards_indicator' }
1298+
- { tag: 'railway:signal:main_repeated:form', value: 'light' }
1299+
1300+
- description: Warning Light
1301+
country: AU
1302+
icon: { default: 'au/nsw/signals/warning_light_bulb' }
1303+
tags:
1304+
- { tag: 'railway:signal:train_protection', value: 'AU:NSW:warning_light' }
1305+
- { tag: 'railway:signal:train_protection:form', value: 'light' }
1306+
- { tag: 'railway:signal:train_protection:shape', value: 'bulb' }
1307+
1308+
- description: Warning Light
1309+
country: AU
1310+
icon: { default: 'au/nsw/signals/warning_light_array' }
1311+
tags:
1312+
- { tag: 'railway:signal:train_protection', value: 'AU:NSW:warning_light' }
1313+
- { tag: 'railway:signal:train_protection:form', value: 'light' }
1314+
- { tag: 'railway:signal:train_protection:shape', value: 'array' }
1315+
1316+
# main/distant + subsidiaries
1317+
- description: Tonnage Light
1318+
country: AU
1319+
icon: { default: 'au/nsw/signals/tonnage' }
1320+
tags:
1321+
- { tag: 'railway:signal:helper_engine', value: 'AU:NSW:tonnage' }
1322+
- { tag: 'railway:signal:helper_engine:form', value: 'light' }
1323+
1324+
- description: Automatic Light
1325+
country: AU
1326+
icon: { default: 'au/nsw/signals/automatic' }
1327+
tags:
1328+
- { tag: 'railway:signal:train_protection', value: 'AU:NSW:A' }
1329+
- { tag: 'railway:signal:train_protection:form', value: 'light' }
1330+
1331+
- description: Dead End Siding (Right)
1332+
country: AU
1333+
icon: { default: 'au/nsw/signals/dead_end_right' }
1334+
tags:
1335+
- { tag: 'railway:signal:short_route', value: 'AU:NSW:dead_end' }
1336+
- { tag: 'railway:signal:short_route:form', value: 'light' }
1337+
- { tag: 'railway:signal:short_route:shape', value: 'right' }
1338+
1339+
- description: Dead End Siding (Left)
1340+
country: AU
1341+
icon: { default: 'au/nsw/signals/dead_end_left' }
1342+
tags:
1343+
- { tag: 'railway:signal:short_route', value: 'AU:NSW:dead_end' }
1344+
- { tag: 'railway:signal:short_route:form', value: 'light' }
1345+
- { tag: 'railway:signal:short_route:shape', value: 'left' }
1346+
1347+
- description: Calling-On / Shunt Ahead
1348+
country: AU
1349+
icon: { default: 'au/nsw/signals/subsidiary' }
1350+
tags:
1351+
- { tag: 'railway:signal:shunting', value: 'AU:NSW:subsidiary' }
1352+
- { tag: 'railway:signal:shunting:form', value: 'light' }
1353+
1354+
1355+
- description: Shunt Route Indicator
1356+
country: AU
1357+
icon: { default: 'au/nsw/signals/stencil' }
1358+
tags:
1359+
- { tag: 'railway:signal:shunting_route', value: 'AU:NSW:stencil' }
1360+
- { tag: 'railway:signal:shunting_route:form', value: 'light' }
1361+
1362+
- description: Close Up
1363+
country: AU
1364+
icon: { default: 'au/nsw/signals/close_up' }
1365+
tags:
1366+
- { tag: 'railway:signal:minor', value: 'AU:NSW:close_up' }
1367+
- { tag: 'railway:signal:minor:form', value: 'light' }
1368+
1369+
- description: Low Speed
1370+
country: AU
1371+
icon: { default: 'au/nsw/signals/low_speed' }
1372+
tags:
1373+
- { tag: 'railway:signal:minor', value: 'AU:NSW:low_speed' }
1374+
- { tag: 'railway:signal:minor:form', value: 'light' }
1375+
1376+
- description: Turnout Route
1377+
country: AU
1378+
icon:
1379+
match: 'railway:signal:switch:states'
1380+
cases:
1381+
- { all: ['right', 'left'], value: 'au/nsw/signals/turnout_both' }
1382+
- { exact: 'right', value: 'au/nsw/signals/turnout_right', description: 'right' }
1383+
- { exact: 'left', value: 'au/nsw/signals/turnout_left', description: 'left' }
1384+
default: 'au/nsw/signals/turnout_off'
1385+
tags:
1386+
- { tag: 'railway:signal:switch', value: 'AU:NSW:turnout_route' }
1387+
- { tag: 'railway:signal:switch:form', value: 'light' }
1388+
1389+
- description: Mainline Indicator – Turnout
1390+
country: AU
1391+
icon:
1392+
match: 'railway:signal:switch:states'
1393+
cases:
1394+
- { all: ['right', 'left'], value: 'au/nsw/signals/MLI/turnout_both' }
1395+
- { exact: 'right', value: 'au/nsw/signals/MLI/turnout_right', description: 'right' }
1396+
- { exact: 'left', value: 'au/nsw/signals/MLI/turnout_left', description: 'left' }
1397+
default: 'au/nsw/signals/MLI/turnout_off'
1398+
tags:
1399+
- { tag: 'railway:signal:switch', value: 'AU:NSW:MLI_turnout' }
1400+
- { tag: 'railway:signal:switch:form', value: 'light' }
1401+
1402+
- description: Mainline Route Indicator
1403+
country: AU
1404+
icon: { default: 'au/nsw/signals/route_indicator' }
1405+
tags:
1406+
- { tag: 'railway:signal:route', value: 'AU:NSW:theatre_box' }
1407+
- { tag: 'railway:signal:route:form', value: 'light' }
1408+
1409+
- description: Turnout Repeater
1410+
country: AU
1411+
icon: { default: 'au/nsw/signals/route_distant_theatre_box' }
1412+
tags:
1413+
- { tag: 'railway:signal:route_distant', value: 'AU:NSW:turnout_repeater' }
1414+
- { tag: 'railway:signal:route_distant:form', value: 'light' }
1415+
- { tag: 'railway:signal:route_distant:shape', value: 'theatre_box' }
1416+
1417+
- description: Turnout Repeater (feather-style)
1418+
country: AU
1419+
icon: { default: 'au/nsw/signals/route_distant_feather' }
1420+
tags:
1421+
- { tag: 'railway:signal:route_distant', value: 'AU:NSW:turnout_repeater' }
1422+
- { tag: 'railway:signal:route_distant:form', value: 'light' }
1423+
- { tag: 'railway:signal:route_distant:shape', value: 'feather' }
1424+
12211425
# --- BE --- #
12221426

12231427
- description: Speed limit light (part of main signal)

import/sql/signal_features.sql.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,15 +375,18 @@ CREATE OR REPLACE FUNCTION signals_railway_signals(z integer, x integer, y integ
375375
features[3] as feature2,
376376
features[4] as feature3,
377377
features[5] as feature4,
378+
features[6] as feature5,
378379
deactivated[1] as deactivated0,
379380
deactivated[2] as deactivated1,
380381
deactivated[3] as deactivated2,
381382
deactivated[4] as deactivated3,
382383
deactivated[5] as deactivated4,
384+
deactivated[6] as deactivated5,
383385
CEIL(icon_height[1] / 2 + icon_height[2] / 2) as offset1,
384386
CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] / 2) as offset2,
385387
CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] + icon_height[4] / 2) as offset3,
386388
CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] + icon_height[4] + icon_height[5] / 2) as offset4,
389+
CEIL(icon_height[1] / 2 + icon_height[2] + icon_height[3] + icon_height[4] + icon_height[5] + icon_height[6] / 2) as offset5,
387390
type
388391
FROM signals s
389392
JOIN signal_features sf
@@ -426,15 +429,18 @@ DO $do$ BEGIN
426429
"feature2": "string",
427430
"feature3": "string",
428431
"feature4": "string",
432+
"feature5": "string",
429433
"deactivated0": "boolean",
430434
"deactivated1": "boolean",
431435
"deactivated2": "boolean",
432436
"deactivated3": "boolean",
433437
"deactivated4": "boolean",
438+
"deactivated5": "boolean",
434439
"offset1": "number",
435440
"offset2": "number",
436441
"offset3": "number",
437442
"offset4": "number",
443+
"offset5": "number",
438444
"type": "string"
439445
}
440446
}

proxy/js/features.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,12 @@ const features = {
846846
lookup: 'signals_railway_signals',
847847
},
848848
},
849+
feature5: {
850+
name: 'Senary signal',
851+
format: {
852+
lookup: 'signals_railway_signals',
853+
},
854+
},
849855
ref: {
850856
name: 'Reference',
851857
},
Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)