Skip to content

Commit 2facf52

Browse files
k-ylehiddewie
andauthored
use the new icon composition system for AU (#685)
using #657, we can now properly render multiple stop positions on the same node. and we can implement light-rail signals now, which was discussed in #595 (comment) (the german system seems to very similar) stop positions: <img width="99" height="98" alt="image" src="https://github.com/user-attachments/assets/692ff89f-3ba5-4d28-b979-3b622c1971f8" /> <img width="110" height="119" alt="image" src="https://github.com/user-attachments/assets/b899171c-0505-4017-a385-c3f5b9d55b93" /> light-rail signals: <img width="125" height="127" alt="image" src="https://github.com/user-attachments/assets/90cd353a-d975-46b4-930b-b9ef7fd3f85f" /> <img width="148" height="286" alt="image" src="https://github.com/user-attachments/assets/b27d9aeb-5951-432f-8d26-cf5ebd0d8671" /> --------- Co-authored-by: Hidde Wieringa <[email protected]>
1 parent cb68b8b commit 2facf52

File tree

19 files changed

+234
-2
lines changed

19 files changed

+234
-2
lines changed

features/signals_railway_signals.yaml

Lines changed: 133 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,102 @@ features:
10301030
- { tag: 'railway:signal:main', value: 'AU:LightRail:NSW:PI' }
10311031
- { tag: 'railway:signal:main:form', value: 'light' }
10321032

1033+
- description: Points Indicator
1034+
country: AU
1035+
exampleIcon: au/LightRail/signals/PI/straight
1036+
icon:
1037+
- match: 'railway:signal:minor:states'
1038+
cases:
1039+
- { exact: 'stop', value: 'au/LightRail/signals/PI/stop' }
1040+
position: bottom
1041+
1042+
- match: 'railway:signal:minor:states'
1043+
cases:
1044+
- { exact: 'stop_red', value: 'au/LightRail/signals/PI/stop_red' }
1045+
position: bottom
1046+
1047+
- match: 'railway:signal:minor:states'
1048+
cases:
1049+
- { exact: 'straight', value: 'au/LightRail/signals/PI/straight' }
1050+
position: bottom
1051+
1052+
- match: 'railway:signal:minor:states'
1053+
cases:
1054+
- { exact: 'right', value: 'au/LightRail/signals/PI/right' }
1055+
position: bottom
1056+
1057+
- match: 'railway:signal:minor:states'
1058+
cases:
1059+
- { exact: 'left', value: 'au/LightRail/signals/PI/left' }
1060+
position: bottom
1061+
tags:
1062+
- { tag: 'railway:signal:minor', value: 'AU:LightRail:PI' }
1063+
- { tag: 'railway:signal:minor:form', value: 'light' }
1064+
1065+
- description: Signal Operated Points Indicator
1066+
country: AU
1067+
exampleIcon: au/LightRail/signals/SPI/straight
1068+
icon:
1069+
- match: 'railway:signal:minor:states'
1070+
cases:
1071+
- { exact: 'locked', value: 'au/LightRail/signals/SPI/locked' }
1072+
position: bottom
1073+
1074+
- match: 'railway:signal:minor:states'
1075+
cases:
1076+
- { exact: 'straight', value: 'au/LightRail/signals/SPI/straight' }
1077+
position: bottom
1078+
1079+
- match: 'railway:signal:minor:states'
1080+
cases:
1081+
- { exact: 'right', value: 'au/LightRail/signals/SPI/right' }
1082+
position: bottom
1083+
1084+
- match: 'railway:signal:minor:states'
1085+
cases:
1086+
- { exact: 'left', value: 'au/LightRail/signals/SPI/left' }
1087+
position: bottom
1088+
tags:
1089+
- { tag: 'railway:signal:minor', value: 'AU:LightRail:SPI' }
1090+
- { tag: 'railway:signal:minor:form', value: 'light' }
1091+
1092+
- description: Signal System Lanterns
1093+
country: AU
1094+
exampleIcon: au/LightRail/signals/SI/straight
1095+
icon:
1096+
- match: 'railway:signal:main:states'
1097+
cases:
1098+
- { exact: 'stop', value: 'au/LightRail/signals/SI/stop' }
1099+
position: bottom
1100+
1101+
- match: 'railway:signal:main:states'
1102+
cases:
1103+
- { exact: 'straight', value: 'au/LightRail/signals/SI/straight' }
1104+
position: bottom
1105+
1106+
- match: 'railway:signal:main:states'
1107+
cases:
1108+
- { exact: 'right', value: 'au/LightRail/signals/SI/right' }
1109+
position: bottom
1110+
1111+
- match: 'railway:signal:main:states'
1112+
cases:
1113+
- { exact: 'left', value: 'au/LightRail/signals/SI/left' }
1114+
position: bottom
1115+
1116+
- match: 'railway:signal:main:states'
1117+
cases:
1118+
- { exact: 'error', value: 'au/LightRail/signals/SI/error' }
1119+
position: bottom
1120+
1121+
- match: 'railway:signal:main:states'
1122+
cases:
1123+
- { exact: 'warning', value: 'au/LightRail/signals/SI/warning' }
1124+
position: bottom
1125+
tags:
1126+
- { tag: 'railway:signal:main', value: 'AU:LightRail:SI' }
1127+
- { tag: 'railway:signal:main:form', value: 'light' }
1128+
10331129
# --- AU-NSW-signs --- #
10341130

10351131
- description: Alert
@@ -1173,20 +1269,56 @@ features:
11731269

11741270
- description: Stop Position
11751271
country: AU
1272+
exampleIcon: 'au/nsw/signs/stop_position/unknown'
11761273
icon:
11771274
- match: 'railway:signal:stop:states'
11781275
cases:
11791276
- { any: [ 'X', 'XPT', 'XPL' ], value: 'au/nsw/signs/stop_position/X' }
1277+
position: bottom
1278+
- match: 'railway:signal:stop:states'
1279+
cases:
11801280
- { exact: '10', value: 'au/nsw/signs/stop_position/10' }
1281+
position: bottom
1282+
- match: 'railway:signal:stop:states'
1283+
cases:
11811284
- { exact: '8', value: 'au/nsw/signs/stop_position/8' }
1285+
position: bottom
1286+
- match: 'railway:signal:stop:states'
1287+
cases:
11821288
- { exact: '8H', value: 'au/nsw/signs/stop_position/8H' }
1289+
position: bottom
1290+
- match: 'railway:signal:stop:states'
1291+
cases:
11831292
- { exact: '8V', value: 'au/nsw/signs/stop_position/8V' }
1293+
position: bottom
1294+
- match: 'railway:signal:stop:states'
1295+
cases:
11841296
- { exact: '6', value: 'au/nsw/signs/stop_position/6' }
1297+
position: bottom
1298+
- match: 'railway:signal:stop:states'
1299+
cases:
11851300
- { exact: '6V', value: 'au/nsw/signs/stop_position/6V' }
1301+
position: bottom
1302+
- match: 'railway:signal:stop:states'
1303+
cases:
11861304
- { exact: '4', value: 'au/nsw/signs/stop_position/4' }
1305+
position: bottom
1306+
- match: 'railway:signal:stop:states'
1307+
cases:
1308+
- { any: ['4H', 'H4'], value: 'au/nsw/signs/stop_position/4H' }
1309+
position: bottom
1310+
- match: 'railway:signal:stop:states'
1311+
cases:
11871312
- { exact: '4V', value: 'au/nsw/signs/stop_position/4V' }
1313+
position: bottom
1314+
- match: 'railway:signal:stop:states'
1315+
cases:
11881316
- { exact: '2', value: 'au/nsw/signs/stop_position/2' }
1189-
default: 'au/nsw/signs/stop_position/unknown'
1317+
position: bottom
1318+
- match: 'railway:signal:stop:states'
1319+
cases:
1320+
- { any: ['2C', 'C2'], value: 'au/nsw/signs/stop_position/2C' }
1321+
position: bottom
11901322
tags:
11911323
- { tag: 'railway:signal:stop', value: 'AU:NSW:stop_position' }
11921324
- { tag: 'railway:signal:stop:form', value: 'sign' }

proxy/js/features.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const electrification_signals = all_signals.features.filter(feature => feature.t
1717
// TODO add links to documentation
1818

1919
const requireUniqueEntries = array => {
20-
const count = Object.groupBy(array, it => it[0]);
20+
const count = Object.groupBy(array.filter(it => it[0]), it => it[0]);
2121
if (Object.values(count).some(it => it.length > 1)) {
2222
const offendingEntries = Object.entries(count).filter(it => it[1].length > 1).map(it => it[0]).join(', ');
2323
throw new Error(`entries must be unique, offending entries: ${offendingEntries}`);
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)