Skip to content

Show multiple train protection systems#976

Merged
hiddewie merged 28 commits into
masterfrom
multiple-train-protection-systems
Jun 9, 2026
Merged

Show multiple train protection systems#976
hiddewie merged 28 commits into
masterfrom
multiple-train-protection-systems

Conversation

@hiddewie

@hiddewie hiddewie commented May 29, 2026

Copy link
Copy Markdown
Owner

Closes #549

Railway line states

Railway lines under construction and proposed are shown from zooms 7 onwards. These are a single dashed line with the train protection under construction if defined, and otherwise the train protection.

Present railway lines show one, two or three train protection systems present on the line, with dashes in multiple colors. If additionally a train protection system is under construction, it will be shown with dashes "around" the solid line.

No train protection

Previously there were explicit combinations configured for the case when one or more train protection tags were set to no. Instead, if no train protection system is matched, a check is done against all known tags. If any of the tags is no, and all tags which are not no are missing, the railway line is classified explicitly has having no train protection.

Testing

Single train protection (http://localhost:8000/#view=8.43/47.33/1.057/0/1&style=signals):
image

Dual train protection (http://localhost:8000/#view=13.76/49.3852/6.17502/90.4/33&style=signals):
image
(http://localhost:8000/#view=13.41/49.55418/5.70635/0/1&style=signals)
image

Triple train protection (http://localhost:8000/#view=14.81/38.4966/-8.14791/0/1&style=signals)
image

Train protection under construction (http://localhost:8000/#view=11.43/49.2809/6.12&style=signals):
image
(http://localhost:8000/#view=14.73/49.43786/5.62508/0/1&style=signals)
image

No train protection, unknown train protection (http://localhost:8000/#view=14.94/49.23037/2.88653/0/1&style=signals):
image

Legend:
image

Country specific details:
(South Korea, http://localhost:8000/#view=6.76/36.675/128.003/0/1&style=signals)
image
(South Korea, http://localhost:8000/#view=10.24/36.3903/127.5182/0/1&style=signals)
image
(UK, London, http://localhost:8000/#view=14.27/51.50629/-0.09066/0/1&style=signals)
image
(UK, Great Western Main Line, http://localhost:8000/#view=14.34/51.50855/-0.47537/0/1&style=signals)
image
(Central Europe, construction of ETCS, http://localhost:8000/#view=5.06/51.25/10.24/0/1&style=signals)
image
(USA, Philadelphia)
image
(Uruguay, construction of ETCS, http://localhost:8000/#view=6.99/-33.272/-56.044/0/1&style=signals)
image

@hiddewie hiddewie marked this pull request as ready for review May 30, 2026 16:19
@hiddewie

Copy link
Copy Markdown
Owner Author

East US is becoming very colorful.
(http://localhost:8000/#view=14.23/40.03257/-75.32718/0/1&style=signals):
image

Korea shows both KTCS and ETCS and ATC which may not be ideal.
(http://localhost:8000/#view=11.33/35.8208/127.1831/0/1&style=signals):
image

Train protection under construction shows double bridges:
image

@RailandSea

Copy link
Copy Markdown

Curious question, could you exclude the PTC tag? The NEC would show ACSES and ETMS with the ATC in some spots.

@hiddewie

Copy link
Copy Markdown
Owner Author

Yes exactly, I was looking into these kind of system combinations where one should exclude detection of the other.

Indeed KTCS and ETCS have such a relationship, like PTC with ACSES and ETMS and I assume ITCS.

@RailandSea

Copy link
Copy Markdown

ITCS,ETMS,ACSES are pretty much the main PTC systems in the US. PTC tag was the only option for the other ORM.ORG map pretty much not needed. Oh CBTC is a PTC system for 1 railroad in the US (PATH)

The ATC is part of cab signal system speed protection in the US as well before PTC was mandated.

@hiddewie

Copy link
Copy Markdown
Owner Author

ACSES and ATC, crossing another line with ETMS and ATC.
http://localhost:8000/#view=15.3/40.192853/-74.887235/0/1&style=signals
image

South Korea zoomed out (with KTCS under construction visible)
http://localhost:8000/#view=6.95/36.28/128.486/0/1&style=signals
image
South Korea zoomed in, line with ETCS, another with KTCS under construction, and another equipped with KTCS and ATS together
http://localhost:8000/#view=12.35/35.9235/126.9831/0/1&style=signals
image

@hiddewie

Copy link
Copy Markdown
Owner Author

One thing which I am not happy about is the dashes of multiple lines getting all mixed up on zooms 7 to 14
(South of London, http://localhost:8000/#view=12.39/51.48971/-0.10506/0/1&style=signals)
image

From zoom 14 onwards it looks much more sensible
image

@hiddewie

Copy link
Copy Markdown
Owner Author

Screenshots updated. This should be good to go!

@hiddewie hiddewie enabled auto-merge (squash) June 9, 2026 15:25
@hiddewie hiddewie merged commit 227f390 into master Jun 9, 2026
3 checks passed
@hiddewie hiddewie deleted the multiple-train-protection-systems branch June 9, 2026 15:33
@k-yle

k-yle commented Jun 10, 2026

Copy link
Copy Markdown

this is awesome !

I noticed that train protection colours don't work anymore for proposed railways (example), is that change intentional, or is it a tagging issue?

@RailandSea

Copy link
Copy Markdown

image

It shows when you click on it but the colour is gone.

@hiddewie

Copy link
Copy Markdown
Owner Author

Proposed railway lines should also show the color like before. That change was not intended.

@hiddewie

Copy link
Copy Markdown
Owner Author

The problem of the missing colors on construction and proposed lines will be solved with #998. Thanks for noticing this.

hiddewie added a commit that referenced this pull request Jun 14, 2026
…998)

Noticed in
#976 (comment).

At the moment the colors of railway lines under construction or are
proposed are not rendered correctly and become gray.

The composed Maplibre expressions were not handled correctly in the
style.

Before and after
(https://openrailwaymap.app/#view=11.03/-28.6023/150.4&style=signals):
<img width="1843" height="947" alt="image"
src="https://github.com/user-attachments/assets/6914ff36-5fa2-4902-a3eb-e3d9f2713c99"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple train protection systems on the same line

3 participants