Skip to content

OpenRailwayMap-vector integration#132

Open
hiddewie wants to merge 768 commits into
OpenRailwayMap:masterfrom
hiddewie:master
Open

OpenRailwayMap-vector integration#132
hiddewie wants to merge 768 commits into
OpenRailwayMap:masterfrom
hiddewie:master

Conversation

@hiddewie

@hiddewie hiddewie commented Jun 7, 2025

Copy link
Copy Markdown
Contributor

Hi!

Over the past years I have been working on a fork of the OpenRailwayMap.

The announcement can be found on the OpenRailwayMap mailing list and on the OpenStreetMap community forum.

The fork has several features, and is actively being developed by me and several more contributors:

  • Vector-based data: the map is interactive with e.g. hover and popup showing data details.
  • Map style improvements: station size, state of lines and statons, signal support for many new countries.
  • Visual UI improvements like: configurable background map, map settings and dark mode.
  • Additional layers: loading gauge and track class.
  • Daily data updates for the entire planet.
  • OpenHistoricalMap integration for historical railway infrastructure.

At the moment the fork is hosted on https://openrailwaymap.app using Fly.io. This is purely practical, it could be hosted anywhere else.

This pull request is a starter to discuss:

  • Can we integrate the fork into the Github OpenRailwayMap organization
  • Can we publish the fork on the domain openrailwaymap.org?

These are open questions, any response is appreciated!

hiddewie and others added 29 commits October 26, 2025 13:41
Docs in
https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging_in_France#Cab_signalling

Changes:
- Cab signalling signs
- TVM and ETCS stop marker signs
- Shunting marker
- Wrong route
- Distant route indicator and route indicator
- Distant stop and stop signals
- Shunting signals
Changes:
- correct detecting block markers with the arrow shape
- add support for the tagging of block markers with lights for shunting
movements (227a and 227c)
- simplify icons a bit


Docs in
https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging_in_Netherlands#ETCS_stop_marker

(http://localhost:8000/#view=19.1/51.8958495/5.8106961&style=signals):
<img width="893" height="622" alt="image"
src="https://github.com/user-attachments/assets/fbf3f428-2621-493c-b337-442b81c8d1a2"
/>
This keeps the tile sources consistent (currently it is a mix of views
and functions), and allows using the 'id' column of a layer as ID,
without promoting it client-side.

Changing the fields of a single tile view is also possible by redefining
the tile function (and comment), without further changing the Martin
configuration or even restarting the Martin container.
Fixes #605 

Implements:

- ETCS block markers
- TVM/CBTC block markers
- Cab Shunt Entry block markers
- Entry, Exit, and Warning of entry into cab signalling
    - Directional arrows for the above (left and right only)
- Block marker absolute/passable plates

Drawn from the relevant RSSB standards.

---

- [x] Tagging on map
- [x] Description on the [UK Rail Signal Tagging
page](https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging_in_the_United_Kingdom)

---

## Potential testing locations

| Location | What's there |
| --------- | -------------- |
| Aberystwyth | ETCS block markers, cab signalling entry (2) |
| Dovey Junction | ETCS block markers |
| Tywyn | ETCS block markers, shunt entry block markers, cab signalling
entry |
| Barmouth | ETCS block markers, shunt entry block markers, cab
signalling entry |
| Harlech | ETCS block markers, shunt entry block markers |

Note: At Barmouth the crossing signal (white/red flashing light) should
be above the ETCS block marker at the UP end of the platforms.

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
TMACS is another australian system
([enwiki](https://en.wikipedia.org/wiki/Train_Management_and_Control_System)
| [osmwiki](https://osm.wiki/Key:railway:tmacs)). Just like ATMS (#546),
it uses GPS instead of Balises.


To avoid a colour clash, i've used `#ffcc00`. This is a list of every
colour used in Australia:

* `#006eff` ETCS
* `#cc0052` CBTC
* `#43b54d` ATMS
* `#884400` TWC
* `#ffc0cb` TPWS
* `#ffcc00` TMACS 🆕

<img width="1165" height="687" alt="image"
src="https://github.com/user-attachments/assets/0e135eda-fa9d-42fd-9028-f60d9d48b6e7"
/>
<img width="1290" height="516" alt="image"
src="https://github.com/user-attachments/assets/4595c1f8-1125-4451-9b0d-0827bdf23a27"
/>
~~Partially reverts
#636

The background map does not load entirely through the changes in
maplibre/maplibre-gl-js#6469, see comment
maplibre/maplibre-gl-js#6469 (comment).

Fixed in maplibre/maplibre-gl-js#6650, released
in https://github.com/maplibre/maplibre-gl-js/releases/tag/v5.11.0.

Closes #644

I also removed all unused javascript assets.
Fixes #645 

If the platforms are included in a `stop_area` relation, they will be
included in the station bubble as well.

http://localhost:8000/#view=15.8/51.887194/4.552073:
<img width="972" height="684" alt="image"
src="https://github.com/user-attachments/assets/09539276-8e26-407b-b6b4-9f03afa83bf1"
/>

<img width="972" height="684" alt="image"
src="https://github.com/user-attachments/assets/104491d6-99f7-4cf8-be71-c8241507419c"
/>

<img width="1160" height="825" alt="image"
src="https://github.com/user-attachments/assets/27083aa9-263e-4f72-a073-ff51d1fa2506"
/>

http://localhost:8000/#view=17.41/52.283907/6.419948:
<img width="1160" height="825" alt="image"
src="https://github.com/user-attachments/assets/3a76f178-004d-483b-a1ad-7717ef8f1394"
/>
I added italian square main, distant and combined signal icons. They are
used where signals are placed on the right of the track they reference
to. I don't know how to test the updates to
signals_railway_signals.yaml. I hope for the best.

I proposed to split italian AVA.svg and AVV.svg substitute signal icons
from primary signals they can be referenced to. I don't know if the this
issue can be implemented: have a look to comments i wrote in
signals_railway_signals.yaml.

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Fixes #647

Berlin Friedrichstraße
(http://localhost:8000/#view=16.89/52.520229/13.38747) looks like a work
of art:

<img width="1254" height="898" alt="image"
src="https://github.com/user-attachments/assets/5e924554-d9aa-48ff-9023-00981160f98c"
/>
<img width="1254" height="898" alt="image"
src="https://github.com/user-attachments/assets/1286109a-0a37-454f-8eb9-c4966bfae167"
/>
<img width="1254" height="898" alt="image"
src="https://github.com/user-attachments/assets/4b1561ee-d52e-4f58-88ee-7c5fa1cb024f"
/>

Note that the 2 light_rail stop positions are tagged as `train = yes`,
so they are rendered orange (for train) instead of green (light rail).

Legend:
<img width="377" height="483" alt="image"
src="https://github.com/user-attachments/assets/fd13ca5b-5583-436c-96ac-1e9e7038b247"
/>
…gnal query (#659)

Split off from
#657 to make that
PR a bit smaller.

Part of #484, this improves performance importing signals.

This pull request splits off the *direction* and *features* (*icons*)
into separate views.

During tile rendering, the `signals` table is joined with the direction
and feature views to determine the signal direction and features for map
display.
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 <hidde@hiddewieringa.nl>
After #642 CI
failed in #642
because of missing merge checks for import tests.
Selecting the correct radio button from user configuration for the
station labels in the settings UI was using the incorrect variable.
Part of #545 

Requires decoupling the icon from the signal "feature".

Goal: instead of duplicating the same signal features because they have
similar tags but need different icons:
```yaml
  - description: 1ª categoria quadro (Avvio & Avanzamento) (1 light)
    country: IT
    icon:
      match: 'railway:signal:main:states'
      cases:
        - { any: ['(Y)', 'Y'], value: 'it/main-s-1v-AVV-AVA-Y' }
        - { exact: 'G', value: 'it/main-s-1v-AVV-AVA-G' }
      default: 'it/main-s-1v-AVV-AVA-R'
    tags:
      - { tag: 'railway:signal:main', value: 'IT:1V' }
      - { tag: 'railway:signal:main:form', value: 'light' }
      - { tag: 'railway:signal:main:shape', value: 'square' }
      - { tag: 'railway:signal:main:substitute_signal', all: ['IT:AVA', 'IT:AVV'] }

  - description: 1ª categoria quadro (Avanzamento) (1 light)
    country: IT
    icon:
      match: 'railway:signal:main:states'
      cases:
        - { any: ['(Y)', 'Y'], value: 'it/main-s-1v-AVA-Y' }
        - { exact: 'G', value: 'it/main-s-1v-AVA-G' }
      default: 'it/main-s-1v-AVA-R'
    tags:
      - { tag: 'railway:signal:main', value: 'IT:1V' }
      - { tag: 'railway:signal:main:form', value: 'light' }
      - { tag: 'railway:signal:main:shape', value: 'square' }
      - { tag: 'railway:signal:main:substitute_signal', value: 'IT:AVA' }
```
instead, allow multiple icons, composed with each other:
```yaml
  - description: 1ª categoria quadro (1 light)
    country: IT
    icon:
      - default: 'it/main-1v-s'
      - match: 'railway:signal:main:states'
        cases:
          - { any: ['(Y)', 'Y'], value: 'it/1v-Y' }
          - { exact: 'G', value: 'it/1v-G' }
          - { exact: 'R', value: 'it/1v-R' }
      - match: 'railway:signal:main:substitute_signal'
        cases:
          - { all: ['IT:AVA', 'IT:AVV'], value: 'it/AVV-AVA', description: 'Avvio & Avanzamento' }
          - { exact: 'IT:AVA', value: 'it/AVA', description: 'Avanzamento' }
          - { exact: 'IT:AVV', value: 'it/AVV', description: 'Avvio' }
    tags:
      - { tag: 'railway:signal:main', value: 'IT:1V' }
      - { tag: 'railway:signal:main:form', value: 'light' }
      - { tag: 'railway:signal:main:shape', value: 'square' }
```
(this example is only combining 2 signals, the Italian signals will have
more variants composed together)

For a full example, see
#639 which has
huge duplication because of the large variety in tagging. (A good thing,
but currently the YAML configuration does not support such use cases
well.)

This requires changes in many different places:
- [x] UI icon map rendering #656
- [x] Icon size determination
- [x] Signal feature SQL
- [x] YAML signal configuration
- [x] Taginfo
- [x] JOSM preset
- [x] Documentation
- [x] Signal feature performance
- [x] Duplicated features in popup
- [x] Make offsets work
- [x] Split off commit
66a7eae
into separate PR --> #659
Followup on #657

Features with multiple icons did not output their icon height correctly
for non-center-positioned icons.

Now the feature icon height is calculated as
```
max(max(centered) + sum(top_bottom), left_right)
```
with centered the height of centered icons, `top_bottom` the height of
the top/bottom positioned icons, and `left_right` the left/right
positioned icons.


Tested on
http://localhost:8000/#view=18.5/45.5409841/11.5417528&style=signals:
Before:
<img width="1275" height="574" alt="image"
src="https://github.com/user-attachments/assets/d99aa4fb-2f50-4ddd-86ae-00037074cc28"
/>


After:
<img width="1196" height="586" alt="image"
src="https://github.com/user-attachments/assets/5e6f79b9-99bc-4ced-8e20-7cda5f8e06ad"
/>
Fixes #667 

(http://localhost:8000/#view=19.33/50.4629604/4.6709142&style=signals):
<img width="748" height="468" alt="image"
src="https://github.com/user-attachments/assets/af484136-3610-469e-9b57-79582bf6f430"
/>
Fixes #630

Changes:
- Support for T-144 and new T-144 signs
- Support for T-270 - T272 signs for stop positions
- Support for T-273 - T275 signs for train compositions


Tampere
(http://localhost:8000/#view=15.94/61.498645/23.774113/-43.1&style=signals):
<img width="1091" height="980" alt="image"
src="https://github.com/user-attachments/assets/275faf5c-9530-45dd-a719-0f9c30898cfb"
/>


Nokia
(http://localhost:8000/#view=16.44/61.481815/23.501053&style=signals):
<img width="1335" height="1004" alt="image"
src="https://github.com/user-attachments/assets/eb04e71c-82c6-415f-9a42-ed4d1d459010"
/>


Note some signals have multiple stop signals tagged on a single node,
which does not work.
Application of
#657 for
simplifying the IT icons.

Related to #639

cc @MatCr90 this PR simplifies the icon setup for the IT
main/combined/distant signals.

(http://localhost:8000/#view=16.99/45.666447/11.936039&style=signals):
<img width="1624" height="699" alt="image"
src="https://github.com/user-attachments/assets/48a3e332-68df-4f73-a658-e08e47824f5a"
/>

(http://localhost:8000/#view=16.62/45.541332/11.539128&style=signals):
<img width="1752" height="839" alt="image"
src="https://github.com/user-attachments/assets/0cabc0ea-6044-4dd2-b39b-410da1583a48"
/>

(http://localhost:8000/#view=18.96/45.5404914/11.5740117&style=signals):
<img width="757" height="502" alt="image"
src="https://github.com/user-attachments/assets/e0e43b6e-71ab-4a4f-b4fa-e1916c223434"
/>



TODO: 
- [x] example icons for preset/taginfo
Fixes #662

Tested on http://localhost:8000/#view=14.97/31.1833/-82.38589 at
Waycross.
<img width="1420" height="929" alt="image"
src="https://github.com/user-attachments/assets/2b371d62-8054-47b6-a3fa-2e39eae2c934"
/>
I changed the code of "2 lights italian distant signal icon" (avviso) to
show the black and white pole, not correctly rendered.
<img width="307" height="306" alt="screen"
src="https://github.com/user-attachments/assets/4ecbd11f-4cce-49bf-83d1-59b1f1b8b33d"
/>

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Recently, I've surveyed Warsaw Central with its new railway signalling
and having discussed at forum on Skyscrapercity
(https://www.skyscrapercity.com/threads/warszawa-warszawski-w%C4%99ze%C5%82-kolejowy.979536/page-364?post_id=195487518#post-195487518)
I've realised that a certain type of semaphore hadn't existed.

It's the case when semaphore has 5 cells
(green-yellow-red-yellow-white), but the 2-cell signals contain only
yellow lights, no green-yellow (as it's currently implied by code).
Thus, I've made it possible to render properly currently 2 semaphores
(G1C and G2C, https://www.openstreetmap.org/node/12021271222 and
https://www.openstreetmap.org/node respectively) at Warsaw Central
station

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Part of #662

Especially useful for yards which can be tagged as a `landuse = railway`
in combination with the area of the yard.

The station bubble automatically encloses the entire yard.

On Waycross, Rice Yard,
(http://localhost:8000/#view=13.86/31.18399/-82.3864):
<img width="1318" height="982" alt="image"
src="https://github.com/user-attachments/assets/c1c559b8-3b99-4543-85bb-cc7a639d6e10"
/>
Base implementation for some tagged US and Canada main and distant
signals

Closes #653

This will need more work as the US and Canada establish tagging
guidelines.

### US

Around Chicago

(http://localhost:8000/#view=14.3/41.89746/-87.92877&style=signals):
<img width="1755" height="574" alt="image"
src="https://github.com/user-attachments/assets/afffbc16-86b7-4891-a45d-fc85028ea20a"
/>

(http://localhost:8000/#view=15.64/41.482924/-88.088233&style=signals):
<img width="804" height="905" alt="image"
src="https://github.com/user-attachments/assets/55cc3340-f3cd-4848-ae45-fcb612a0019b"
/>

(http://localhost:8000/#view=16.76/38.680231/-90.172901&style=signals):
<img width="854" height="560" alt="image"
src="https://github.com/user-attachments/assets/a058616e-0c8f-4b07-8d68-4e5e55bbe1a7"
/>



### Canada

(http://localhost:8000/#view=14.42/44.59721/-75.69216&style=signals):
<img width="797" height="562" alt="image"
src="https://github.com/user-attachments/assets/f65db79a-bc0d-4e95-a53c-94a2265fc419"
/>
Fixes #681

For some reason all paragraph properties (those with a large amount of
text) were excluded from showing in the popup.

<img width="519" height="483" alt="image"
src="https://github.com/user-attachments/assets/cee9b30e-648c-4848-a806-3bd6e1241e66"
/>
<img width="995" height="572" alt="image"
src="https://github.com/user-attachments/assets/af7def20-7bcc-4446-8f2b-65933b38628d"
/>
This adjusts the colour scale of the speed layer with the goal of using
a wider range of colours for low speed values. See #668 for more
details.
<img width="1567" height="619" alt="image"
src="https://github.com/user-attachments/assets/6750670a-becb-4378-a071-120cec1bfdcf"
/>
Part of #662

Analysis in
#662 (comment)

This pull request uses the total rail length of all railway lines within
a yard, to assign a measure of importance to the yard.

This is similar to how platforms and railway routes assign importance to
passenger railway stations.

The current thresholds are set at >= 7200 meters of rail is a large
yard, >= 750 meters of rail is a normal yard, and all others are small.

I renamed everything *route count* to *importance*, because stations and
yards each get a (scaled) importance which can be compared (e.g. in API
search results).
Robot8A and others added 30 commits May 19, 2026 08:24
Huge list of functional changes between January and May 2026.

<img width="1430" height="1114" alt="image"
src="https://github.com/user-attachments/assets/45ff1e88-ce19-4457-a1c1-c2927ab54245"
/>
Closes #869 

This pull request adds support for stations without names, in the zooms
where all stations are shown on the map.

Stations without a name will show only a dot.

http://localhost:8000/#view=12.47/34.36065/-3.01361:
<img width="780" height="528" alt="image"
src="https://github.com/user-attachments/assets/f62b9425-85c3-4534-85d1-06960b2f35ec"
/>

http://localhost:8000/#view=15.84/34.351932/-3.040193:
<img width="780" height="528" alt="image"
src="https://github.com/user-attachments/assets/85de77e7-f99e-4b3e-af14-d171268f9105"
/>
Followup from #960 which put the argument of the station name for high
zooms in the operator layer in the wrong place.
Simplify the style expressions for rendering the guage coloring with the
`interpolate-hcl` expression.

<img width="1419" height="798" alt="image"
src="https://github.com/user-attachments/assets/95efcd96-5d77-4ba4-935c-07d3cacca291"
/>
Move the generation of railway line labels for the infrastructure,
electrification and gauge layers to the map style instead of the
database.

The speed label is an exception, it is generated with complex logic
during data import.

Additionally, the reference and name are not output in the low zoom
tiles anymore, because there is no use for it in the tile rendering.


http://localhost:8000/#view=16.33/55.565637/12.903312&style=electrification
<img width="1229" height="384" alt="image"
src="https://github.com/user-attachments/assets/6e2e5593-9541-4fe2-8267-6578a6c655f0"
/>

http://localhost:8000/#view=12.95/39.6525/-0.24478&style=track
<img width="1431" height="780" alt="image"
src="https://github.com/user-attachments/assets/93ad19b6-d013-4b51-8aaf-d3c376441670"
/>

http://localhost:8000/#view=15.42/55.565678/12.897913
<img width="1229" height="384" alt="image"
src="https://github.com/user-attachments/assets/140ce289-d6b1-4e3d-a61b-25004baaba38"
/>
Fixes #951

In the Bordeaux-Saint-Jean station,
http://localhost:8000/#view=17.57/44.825551/-0.555097:
<img width="1009" height="627" alt="image"
src="https://github.com/user-attachments/assets/f764099b-0536-445f-98bc-4415254e963a"
/>
The unit was correct, but the spherical projection was not taken into
account.

Fixes #974

Followup on #971 

On http://localhost:8000/#view=17.74/44.825825/-0.555384,
Bordeaux-Saint-Jean.

Before:
<img width="1019" height="448" alt="image"
src="https://github.com/user-attachments/assets/525c3ba2-df5d-402f-92b0-5392c60e85a8"
/>

After:
<img width="1019" height="448" alt="image"
src="https://github.com/user-attachments/assets/6d34698a-bf1a-4ba9-a81f-bd4c2d18642d"
/>
This saves tile data for stations between zooms 8 and 13, and speed
signals between 13 and 16, where not every feature is shown on the map.

Magdeburg, speed layer:

Zoom 12 http://localhost:8000/#view=12/52.1314/11.6568&style=speed
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/28d3ce4e-8cd1-4b28-a6c3-ae519121837d"
/>

Zoom 13 http://localhost:8000/#view=12/52.1314/11.6568&style=speed
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/4ab53498-3290-4f4c-a974-d5f3723499be"
/>

Zoom 14 http://localhost:8000/#view=14/52.12747/11.62723&style=speed
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/e791d937-ee7c-46a1-815e-6517ce1c1a04"
/>

Zoom 16 http://localhost:8000/#view=16/52.122952/11.625045&style=speed
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/a54f0ec1-c7b9-44cc-8c80-81a899c76822"
/>

Magdeburg, infrastructure layer:

Zoom 8 http://localhost:8000/#view=8/52.131/11.657
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/6bbb922a-08da-4d11-a7d2-044ed9d3e11e"
/>

Zoom 9 http://localhost:8000/#view=9/52.131/11.657
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/2c315281-27db-4ac0-8db8-432a8718e431"
/>

Zoom 10 http://localhost:8000/#view=10/52.131/11.657
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/c7896dce-d25b-4164-9e02-7ff90acc5ed5"
/>

Zoom 11 http://localhost:8000/#view=11/52.131/11.657
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/e48ab783-d4a5-4166-8993-0b1e17ab557e"
/>

Zoom 12 http://localhost:8000/#view=12/52.131/11.657
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/f3027bfa-3ea6-4390-978d-0872d9c85479"
/>

Zoom 13 http://localhost:8000/#view=13/52.12989/11.63333
<img width="1028" height="778" alt="image"
src="https://github.com/user-attachments/assets/1d4124a5-7b53-4b14-b720-f9ece987314d"
/>
This adds most railway signals of Luxembourg.

The documentation can be found at
https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging_in_Luxembourg

- This includes every signal in Luxembourg currently tagged in OSM
except for tram and foreign signals.
- Signals RF6 and RF13 are included as symbols, but not yet implemented
as signal features, as I want to wait for a new suitable signal category
(#972).
- Some other signals not yet tagged in OSM are still missing which I
will add when encountering them in person.
- The only previously implemented signals of Luxembourg were the
catenary ones. I have replaced these to better match their actual design
(as opposed to the French one).
- This probably doesn't matter to anyone but me, but the SVGs are
(except for letters and numbers) entirely written in a text editor which
makes the source code compact and me happy. :)

Due to the large number of signals, I will just show some screenshots
for demonstration. Please ask if you have any questions regarding
specific signals. Most of them can be seen around Luxembourg,
Bettembourg, Ettelbruck and Dudelange-Ville station.
<img width="401" height="553" alt="Screenshot 2026-05-26 193642"
src="https://github.com/user-attachments/assets/ab431718-ec3b-436b-aead-2fadff6a483b"
/><img width="355" height="319" alt="Screenshot 2026-05-26 193744"
src="https://github.com/user-attachments/assets/fad21d46-7284-42ea-aa92-7358e94be847"
/><img width="275" height="303" alt="Screenshot 2026-05-26 193819"
src="https://github.com/user-attachments/assets/c703988d-4dcf-49d8-a9be-ba779ef3bf56"
/><img width="289" height="536" alt="Screenshot 2026-05-26 193837"
src="https://github.com/user-attachments/assets/1abc3ce5-4437-4f4e-bffd-1f66231f944d"
/><img width="366" height="277" alt="Screenshot 2026-05-26 193852"
src="https://github.com/user-attachments/assets/7252b76d-143b-4901-86db-d24e6d041453"
/><img width="298" height="345" alt="Screenshot 2026-05-26 193912"
src="https://github.com/user-attachments/assets/94b701bd-433f-497d-9dae-899cbe1fa25c"
/><img width="169" height="148" alt="Screenshot 2026-05-26 193657"
src="https://github.com/user-attachments/assets/e34d5a21-1d2a-4ff7-af15-cb053a29a467"
/><img width="333" height="643" alt="Screenshot 2026-05-26 193728"
src="https://github.com/user-attachments/assets/3bdae543-abf8-4189-b870-ab2e94ff5a11"
/><img width="204" height="164" alt="Screenshot 2026-05-26 193753"
src="https://github.com/user-attachments/assets/9f753f58-9a5a-4f71-8035-3f4ebcdecb58"
/><img width="136" height="123" alt="Screenshot 2026-05-26 194048"
src="https://github.com/user-attachments/assets/a0918b54-ac2c-4e91-98a3-eff0386c0c87"
/><img width="763" height="284" alt="Screenshot 2026-05-26 193936"
src="https://github.com/user-attachments/assets/914acddd-3b51-422d-b17a-3933b667ae4a"
/><img width="283" height="463" alt="Screenshot 2026-05-26 193953"
src="https://github.com/user-attachments/assets/a3e6ba69-4855-4553-b602-e605eed4abaf"
/><img width="152" height="148" alt="Screenshot 2026-05-26 194013"
src="https://github.com/user-attachments/assets/c56c9f3d-062f-4547-8af8-c55a3848960a"
/><img width="264" height="243" alt="Screenshot 2026-05-26 194137"
src="https://github.com/user-attachments/assets/b3afd038-377f-4dbe-ba26-1499785e4ae3"
/><img width="239" height="257" alt="Screenshot 2026-05-26 194214"
src="https://github.com/user-attachments/assets/91072645-6f7a-4560-8d8b-653f91da1c06"
/><img width="188" height="169" alt="Screenshot 2026-05-26 194150"
src="https://github.com/user-attachments/assets/60fe966d-f7cc-4eee-9458-90bbe5c7f9ba"
/><img width="198" height="154" alt="Screenshot 2026-05-26 194120"
src="https://github.com/user-attachments/assets/c6bde99d-85e5-4685-ace9-e71a5c94b75f"
/><img width="115" height="104" alt="Screenshot 2026-05-26 194109"
src="https://github.com/user-attachments/assets/6dc0b133-e4e7-4bf6-9901-d8cef172a9e0"
/><img width="480" height="576" alt="Screenshot 2026-05-26 194939"
src="https://github.com/user-attachments/assets/9f03d19d-450d-40cb-b262-d015ebf37fae"
/><img width="507" height="577" alt="Screenshot 2026-05-26 194951"
src="https://github.com/user-attachments/assets/dddead8f-3901-4788-9824-c2013fa8a4d6"
/><img width="377" height="77" alt="Screenshot 2026-05-26 195000"
src="https://github.com/user-attachments/assets/09e37a3d-464e-4adf-9938-09e0a58fa998"
/><img width="479" height="264" alt="Screenshot 2026-05-26 194903"
src="https://github.com/user-attachments/assets/8e1fb304-d9f0-464a-a728-740fc9285f17"
/>
http://localhost:8000/#view=16.95/52.498872/13.374558
<img width="1055" height="595" alt="image"
src="https://github.com/user-attachments/assets/5a00f3fe-a3c9-4d2a-9173-43b6efaa2123"
/>

http://localhost:8000/#view=17.03/49.736383/13.353126
<img width="519" height="352" alt="image"
src="https://github.com/user-attachments/assets/7c9f81c7-3093-456a-b30c-17c00cc26a99"
/>
Support for route and block sign signals in The Netherlands.

Route signal,
http://localhost:8000/#view=16.24/52.14363/6.183649/-89.9/58&style=signals
<img width="583" height="538" alt="image"
src="https://github.com/user-attachments/assets/17141c06-f3bb-4bb8-b34b-8cd2cec5af46"
/>

Block sign,
http://localhost:8000/#view=13.91/52.10813/6.06694/-9.6/58&style=signals
<img width="851" height="729" alt="image"
src="https://github.com/user-attachments/assets/14a3e747-d023-440e-ad09-1aef6510497d"
/>
Fixes #978

http://localhost:8000/#view=17.28/49.005052/8.411097&date=1908
<img width="689" height="402" alt="image"
src="https://github.com/user-attachments/assets/8d5224c5-93c5-4f95-b2c2-6167f3549e6c"
/>

Popup is now classifying the features as a way, not a node.

Link now points to
https://www.openhistoricalmap.org/way/199474787#date=1908-01-01&layers=R
which does work.
http://localhost:8000/#view=17.99/49.542571/18.216584
<img width="940" height="603" alt="image"
src="https://github.com/user-attachments/assets/f0038aeb-169c-4103-82c1-14c2e68fbed6"
/>


http://localhost:8000/#view=17.76/50.234833/12.859354&style=electrification
<img width="1517" height="810" alt="image"
src="https://github.com/user-attachments/assets/0532903a-c8bd-446d-8ed5-8df26c011f52"
/>
http://localhost:8000/#view=17.42/49.229176/16.531673&style=electrification
<img width="1010" height="679" alt="image"
src="https://github.com/user-attachments/assets/a5a08357-d011-41d8-8398-cbd81e09483b"
/>
The OSM data has been updated. Ensure the API tests run again.
Add color from the metro's logo

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Fixes #961

Ideally this can be solved more properly when
maplibre/maplibre-gl-js#2108 is implemented,
to render bridges and tunnels for multiple levels over each other in the
correct order.

http://localhost:8000/#view=17.55/52.499678/13.374688
<img width="1001" height="634" alt="image"
src="https://github.com/user-attachments/assets/afd1434d-5f97-4cd9-904a-f4f4e0fc4624"
/>
Fixes #903

The same icon (circle, `general/station-small`), was always used for
railway sites, even if they were historical or future.

With this pull request the correct icon will be used in high zooms (>=
13) as well.

Standard layer:
http://localhost:8000/#view=12.79/51.16835/4.36332
<img width="762" height="708" alt="image"
src="https://github.com/user-attachments/assets/75438076-46dc-451e-9605-169b52e62c24"
/>
http://localhost:8000/#view=15.17/51.171518/4.345346
<img width="762" height="708" alt="image"
src="https://github.com/user-attachments/assets/b109bfa2-c00b-4740-8d94-0e23a99df706"
/>

Operator layer:
http://localhost:8000/#view=14.7/51.17142/4.34895&style=operator
<img width="762" height="708" alt="image"
src="https://github.com/user-attachments/assets/bf0e4a1d-80c8-4ddc-bca7-211f29e8cccd"
/>

Route layer:
http://localhost:8000/#view=15.08/51.17156/4.34562&style=route
<img width="762" height="708" alt="image"
src="https://github.com/user-attachments/assets/f4227dae-d6f5-458e-bd41-08d0163dae7c"
/>
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):
<img width="786" height="340" alt="image"
src="https://github.com/user-attachments/assets/ae88ab1a-7ae8-4050-b142-b5dd58ce1683"
/>

Dual train protection
(http://localhost:8000/#view=13.76/49.3852/6.17502/90.4/33&style=signals):
<img width="1362" height="502" alt="image"
src="https://github.com/user-attachments/assets/4a1de05c-f9bb-4435-ab8d-1d794c2b0a5b"
/>
(http://localhost:8000/#view=13.41/49.55418/5.70635/0/1&style=signals)
<img width="1362" height="502" alt="image"
src="https://github.com/user-attachments/assets/a456a48f-6d2d-481e-b3d9-be214ee5e0cb"
/>

Triple train protection
(http://localhost:8000/#view=14.81/38.4966/-8.14791/0/1&style=signals)
<img width="1311" height="694" alt="image"
src="https://github.com/user-attachments/assets/2be18b6e-a908-49dc-9cdc-7bf9386aa55f"
/>

Train protection under construction
(http://localhost:8000/#view=11.43/49.2809/6.12&style=signals):
<img width="1583" height="921" alt="image"
src="https://github.com/user-attachments/assets/a937a328-e7ff-41a1-8f29-d3529e96ddae"
/>
(http://localhost:8000/#view=14.73/49.43786/5.62508/0/1&style=signals)
<img width="1583" height="921" alt="image"
src="https://github.com/user-attachments/assets/cc5f2f8c-2961-489b-9ae1-63b0371be474"
/>

No train protection, unknown train protection
(http://localhost:8000/#view=14.94/49.23037/2.88653/0/1&style=signals):
<img width="1657" height="536" alt="image"
src="https://github.com/user-attachments/assets/6bba7916-d3a9-419c-841c-9f2723c6716a"
/>

Legend:
<img width="1064" height="709" alt="image"
src="https://github.com/user-attachments/assets/1c17e885-fcf3-4cb2-aa3d-928608fd001e"
/>

Country specific details:
(South Korea,
http://localhost:8000/#view=6.76/36.675/128.003/0/1&style=signals)
<img width="573" height="700" alt="image"
src="https://github.com/user-attachments/assets/801bc924-e064-4649-8104-cf2668f22019"
/>
(South Korea,
http://localhost:8000/#view=10.24/36.3903/127.5182/0/1&style=signals)
<img width="1613" height="932" alt="image"
src="https://github.com/user-attachments/assets/ba88153c-58b9-4ab5-b506-5b3f454cf88d"
/>
(UK, London,
http://localhost:8000/#view=14.27/51.50629/-0.09066/0/1&style=signals)
<img width="1613" height="932" alt="image"
src="https://github.com/user-attachments/assets/5a27fc77-8632-4678-9907-0fd8b8d2b9b4"
/>
(UK, Great Western Main Line,
http://localhost:8000/#view=14.34/51.50855/-0.47537/0/1&style=signals)
<img width="1613" height="932" alt="image"
src="https://github.com/user-attachments/assets/b02f0ba0-ea0e-499c-864d-5c282ee80581"
/>
(Central Europe, construction of ETCS,
http://localhost:8000/#view=5.06/51.25/10.24/0/1&style=signals)
<img width="1613" height="969" alt="image"
src="https://github.com/user-attachments/assets/deceefbf-debe-4db5-a36e-b48b8144115e"
/>
(USA, Philadelphia)
<img width="1001" height="730" alt="image"
src="https://github.com/user-attachments/assets/d9f432f9-3032-43d0-adad-4e3935f8d0f3"
/>
(Uruguay, construction of ETCS,
http://localhost:8000/#view=6.99/-33.272/-56.044/0/1&style=signals)
<img width="1613" height="969" alt="image"
src="https://github.com/user-attachments/assets/34e003f8-e61d-4b76-8001-0173f0aa5b8a"
/>
added more short line freight railroads, added and updated colors for
passenger railroads.

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Part of #988


(http://localhost:8000/#view=15.1/52.39436/13.13404&style=electrification)
<img width="1166" height="618" alt="image"
src="https://github.com/user-attachments/assets/a0a77b3d-53d0-4e86-8a92-8efce9e7f361"
/>
Updated transportation entries for Portugal, including new operators and
color adjustments.

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
Followup on #993

Closes #988

<img width="807" height="483" alt="image"
src="https://github.com/user-attachments/assets/c59f94da-139e-4809-85ce-8352ca2fde41"
/>

Currently the individual voltages and frequencies are shown.

When two voltages and two frequencies are tagged, the conversion is
determined instead, formatted.

At this moment the `frequency_conversion` is not used at this point. See
https://wiki.openstreetmap.org/wiki/Proposal:Traction_substations_extension.
This is a draft of a pull request in collaboration with user
@The3dVehicleguy.

It will add more icons and more detailed rendering of US signals.

This PR is complete. Detailed description of this PR is here:
#952 (comment)

---------

Co-authored-by: Thomas Ray <the3dvehicleguy@gmail.com>
Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
…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"
/>
Fixes #967 

If the user has enabled location tracking, the UI will request the
browser to disable sleep.

See https://developer.chrome.com/docs/capabilities/web-apis/wake-lock
See
https://stackoverflow.com/questions/6106747/can-i-prevent-phone-from-sleep-on-a-webpage
See https://w3c.github.io/screen-wake-lock/
See
https://maplibre.org/maplibre-gl-js/docs/API/classes/GeolocateControl/


Semantics:
- By default does not do anything
- When the user requests location tracking, the browser wake lock is
enabled
- When the user stops location tracking, the browser wake lock is
disabled
- When the user is using location tracking, but moves the map, the wake
lock is disabled until the user re-enables full location tracking
This PR should fix the recent failures in nightly updates.

Recent update to what details are shown for traction substations
improperly uses `%d` in `string.format`.\
`%d` accepts only integers, for real numbers `%f` should be used
instead. That's fixed in this PR.

Do note, that this PR changes the intended behaviour see changes in
tests.

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
In GB, shunt and distant signals are displayed below main signals.
(See:

[https://en.wikipedia.org/wiki/UK_railway_signalling#Position_light_signals](https://en.wikipedia.org/wiki/UK_railway_signalling#Position_light_signals)
and

[https://en.wikipedia.org/wiki/UK_railway_signalling#Semaphore_signals](https://en.wikipedia.org/wiki/UK_railway_signalling#Semaphore_signals))

I've moved the shunt and distant signals before main signals in
signals_railway_signals.yaml so that they are displayed below the main
signal.

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
**PR number 1000 🎉**

Fixes #979

Enabled by maplibre/maplibre-gl-js#1235 and
maplibre/maplibre-gl-js#5812. Supported since
Maplibre GL JS version 5.8.0.

See https://maplibre.org/maplibre-style-spec/layers/#line-dasharray

We can combine duplicated map layers that use different dashes. The
`line-dasharray` supports a data-driven style.

We still have to duplicate dashed lines and non-dashed lines, because
`line-cap` is not data-driven. For lines with a dasharray, the line cap
should be `butt` while for non-dashed lines the line cap should be
`round`.

Deduplicating railway lines with dashes will cause the map style to
contain less layers, causing the map to load quicker. Less layers will
also cause the map to show tiles quicker, because less layers have to be
evaluated for each feature on the map.

Layer differences:
- infrastructure: from 586 to 464
- speed: from 78 to 58
- train protection: from 144 to 166 (because of a correctness split of
dual/multi train protection system lines with/without dashes)
- electrification: from 134 to 74
- track: from 117 to 82
- operator: from 80 to 60
- routes: from 72 to 52

*View diff with whitespace disabled:
https://github.com/hiddewie/OpenRailwayMap-vector/pull/1000/changes?w=1*
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.