Skip to content

OpenRailwayMap-vector integration#132

Open
hiddewie wants to merge 646 commits intoOpenRailwayMap:masterfrom
hiddewie:master
Open

OpenRailwayMap-vector integration#132
hiddewie wants to merge 646 commits intoOpenRailwayMap:masterfrom
hiddewie:master

Conversation

@hiddewie
Copy link
Contributor

@hiddewie hiddewie commented Jun 7, 2025

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 added 29 commits June 29, 2025 10:51
When image or wikimedia commons file tags are present, show the image(s)
in the feature popup.

~Current implementation is impacted by XSS.~

Wikidata lookup does not work: CORS is not enabled for the Wikidata
lookup API. Possible the API needs to be proxied.


![image](https://github.com/user-attachments/assets/af4ed2d2-13b4-43fb-b8ff-e79fd1e43ccf)
Berlin stations changed ordering again
See discussion in
#449

https://openrailwaymap.app/#view=4.16/41.84/-94.04&style=signals

We could also change the coloring if that improves the differences or
grouping between different train protection systems.

cc @DarkTrueNinja1 can you have a look if these changes makes sense?

Before:

![image](https://github.com/user-attachments/assets/0f14ae02-1a8e-4c33-b8b6-e6ba7fe01f5a)

After:

![image](https://github.com/user-attachments/assets/abfcbcff-9b93-46aa-a827-16731278ce72)
Split off from
#454

```
http http://localhost:8000/api/replication_timestamp
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 48
Content-Type: application/json
Date: Sat, 05 Jul 2025 18:33:30 GMT
Server: nginx/1.29.0

{
    "replication_timestamp": "2025-06-28T20:20:41Z"
}
```


![image](https://github.com/user-attachments/assets/aad5f412-4b01-46d5-b6bc-4994da95a190)
Split off from
#454

This makes the proxy image domain agnostic.
~Work in progress.~ Works, and is deployed on
https://openrailwaymap.app. Fly.io deployment is shut down.

Documentation in
https://github.com/hiddewie/OpenRailwayMap-vector/blob/deploy-server/deployment/README.md

TODO:

- [ ] change config to cloud-init configuration
- [x] cron for auto updating, see
60fe463
- [x] cron for docker cleanup, see
167317f
- [x] client certificates for cloudflare -> server authentication, see
#455
- [x] remove hostname dependency in for sources, use relative path
(maplibre/maplibre-gl-js#182 (comment)),
see 1e892ea,
#457
- [x] remove fly.io config, see b58f20b
- [ ] simplify API to not include Postgres DB
- [x] remove `openrailwaymap.fly.dev` redirect from proxy, see
e5f63a9
- [x] remove rate limiting (cloudflare has ddos protection), see
2274f68
- [x] Remove CI for tiles and deploy workflows, see
53ed381
- [x] generate preset version 61319cd
- [x] generate replication timestamp, see
c29fdf5,
#456
- [x] Remove tiles script and config, see
0976222
Followup on #454

Remove Postgres from the API container, and let the API talk directly to
the database.

Verify if the API views and queries can be simplified as well.
Followup on #459

Simplify the database views because the API directly queries the
database in the server deployment.
The last nightly update failed because it tried to trigger the
deployment trigger
(https://github.com/hiddewie/OpenRailwayMap-vector/actions/runs/16092774316/job/45411619735).

Changes:
- [x] Do not trigger a deployment.
- [x] Build the proxy, API and tile images, such that the server does
not have to build them.
- [x] In the deployment, pull images, do not build them.
Fixes #282

Display rules are the same as for `railway=rail`, including the `usage`
and `service` tags.

Ferries display on the standard, loading gauge and operator layer.

https://localhost/#view=10.26/59.8379/9.0296
(https://www.openstreetmap.org/way/122886399):

![image](https://github.com/user-attachments/assets/41be9818-bc2e-4523-b4ca-d2df318564ea)
For local development.
```
docker compose up --build --watch api
```
watches the API directory to make the container automatically rebuild
and restart after making changes.
Fixes #463

(https://localhost/#view=15.47/49.40967/8.660711&style=electrification)
<img width="1586" height="675" alt="image"
src="https://github.com/user-attachments/assets/a937354b-3b2d-4458-b2f6-046ac6b479b9"
/>
Part of #219

(https://localhost/#view=3.94/39.43/-94.7&style=operator)
<img width="1586" height="1116" alt="image"
src="https://github.com/user-attachments/assets/15aac02f-73fa-4d53-81c4-dc64addfa34a"
/>

(Chicago:
https://localhost/#view=12.02/41.70103/-87.58216&style=operator)
<img width="1586" height="1116" alt="image"
src="https://github.com/user-attachments/assets/28183e33-8b50-4994-b1c2-c655be6ef135"
/>

(St Louis,
https://localhost/#view=11.09/38.5243/-90.2815&style=operator)
Shame that *Union Pacific Railroad* and *BNSF Railway* hash to almost
the same color.
<img width="1586" height="1116" alt="image"
src="https://github.com/user-attachments/assets/4e49b6f1-2469-48ce-b084-1574d34a6d83"
/>
Shows stations with operator. Includes yards, junctions, halts, tram
stops, crossovers and sites.

Railway line with matching operator:
(https://localhost/#view=11.93/38.7991/-90.45345&style=operator)
<img width="1116" height="790" alt="image"
src="https://github.com/user-attachments/assets/a75a0ead-660a-406c-9c71-429eb06529d3"
/>
<img width="1116" height="790" alt="image"
src="https://github.com/user-attachments/assets/bc61244f-3a0a-43b8-ad15-42b763711e4a"
/>

Most stations and yards do not have a matching operator:
(https://localhost/#view=10.6/38.6372/-90.1333&style=operator)
<img width="1662" height="1061" alt="image"
src="https://github.com/user-attachments/assets/12139c01-92f6-4be8-a45f-167208b0f10d"
/>

(https://localhost/#view=13.15/38.22554/-89.67217&style=operator)
<img width="881" height="534" alt="image"
src="https://github.com/user-attachments/assets/11fdf7ec-9302-4a52-9e8e-4a85b8650d08"
/>
<img width="881" height="534" alt="image"
src="https://github.com/user-attachments/assets/d3cb3d6a-6444-4987-899f-0bb2127fdfd9"
/>



Popup:
<img width="881" height="534" alt="image"
src="https://github.com/user-attachments/assets/d0dcb3f4-c8d6-4282-8e4e-2b5031706828"
/>
Fixes #473 

Changes:
- Add API that does a lookup for Wikidata image URLs
- Show only thumbnails
- Call the API to find the Wikidata image, and show it in the popup.

<img width="819" height="752" alt="image"
src="https://github.com/user-attachments/assets/ecef20c6-6937-4f47-8760-015dbc3d8953"
/>
<img width="588" height="792" alt="image"
src="https://github.com/user-attachments/assets/4cdd4d56-2c70-4d35-ba94-95119f3d8147"
/>
Only platform nodes are used now for station area station <-> platform
and station <-> stop position references. Platform ways should also
work.
Add ASES train protection. Separate entry, but same color as ACSES.
Handles the `railway:ases = yes` tag.

From
#450 (comment)
Part of #392

Improve import and parsing of railway positions. 

Move logic from SQL to the Lua pre-processing.

Changes:
- Split milestones into multiple values, storing each as a separate
position
- Store the numeric position separate from the textual position. A
textual position is always present, a numerical value is optional.
- Simplify tile and search SQL views.
- Store if a milestone is a *zero*
- Support `km`, `mi` and `pkm` types of milestones


A zero milestone still has a popup with the textual value:
<img width="384" height="264" alt="image"
src="https://github.com/user-attachments/assets/70b35e49-b2b3-4d9c-a18d-e2d4466bbede"
/>

Higher zooms show exact values:
<img width="501" height="453" alt="image"
src="https://github.com/user-attachments/assets/660870cb-221e-468b-bbb5-52d6266e868e"
/>

Negative milestones:
<img width="845" height="643" alt="image"
src="https://github.com/user-attachments/assets/61ad3b11-6ba2-4cb4-95ef-e20de2e8d680"
/>

Support for `km`, `mi` and `pkm` position types:
<img width="470" height="343" alt="image"
src="https://github.com/user-attachments/assets/e8acb110-c23a-4bdb-80a8-cd01c9aee193"
/>
When the map has a bearing on page load, the colored bearing map control
did not show a color, even though it was rotated.

<img width="703" height="567" alt="image"
src="https://github.com/user-attachments/assets/ef74a5ff-e69c-4b75-889e-32b22eeb731c"
/>
hiddewie and others added 20 commits January 26, 2026 22:33
Before, a single error with the filename of a single file that does not
exist.

After, all errors are concatenated together into a single large error:
```
Error: Failed to resolve promises: Error: Failed to resolve promises: Error: Failed to resolve promises: Error: ENOENT: no such file or directory, open 'symbols/pl/s6-3-main.svg', Error: Failed to resolve promises: Error: Failed to resolve promises: Error: ENOENT: no such file or directory, open 'symbols/pl/s9-13a-4.svg', Error: Failed to resolve promises: Error: Failed to resolve promises: Error: ENOENT: no such file or directory, open 'symbols/pl/s6-3.svg', Error: ENOENT: no such file or directory, open 'symbols/pl/s9-3.svg'
```
Adds preliminary route indicators.

See https://www.railsigns.uk/photos/p_route2.html#pic_priup for some
photos, and https://www.railsigns.uk/sect6page5.html for a description.

I know that there are a few tagged on the approach to Reading West from
Southcote Junction.
Though, be aware that they were added using a slightly different tag
today, before being changed (see description of commit
689f4b5).
1. Changed color of '인천교통공사' to #ff671f, one of another symbolic color
of the operator, in order to visually differentiate it from '공항철도주식회사'.
2. Moved '(주)우진메트로' to #95296f because it was wrongly categorized. (and
those three operators belong to same parent company)
3. Added '우진메트로양산'.
<img width="1096" height="1392" alt="image"
src="https://github.com/user-attachments/assets/affa432e-2aaa-474a-a7fc-38059939123d"
/>
Fixes #794

If the user has not configured the preferred track layer visualization,
the track layer will default to the gauge. The configuration UI also
shows this default. However the map did not incorporate it in all
places, showing every line as having an unknown gauge.
Fixes #739

Simplify the rendering layers for symbols in the standard layer.

The icons are all rendered using the same method.

The text is rendered below, the reference was missing in some cases.

(http://localhost:8000/#view=15.55/50.881/5.668061):
<img width="569" height="498" alt="image"
src="https://github.com/user-attachments/assets/c07faba4-9e48-4e66-9565-8417905986df"
/>

(http://localhost:8000/#view=15.04/51.02047/2.94469):
<img width="1920" height="691" alt="image"
src="https://github.com/user-attachments/assets/7b7f45e2-6861-4b83-9598-5ab52e531ecf"
/>

Additionally, the name is shown in the popup if it exists on a feature.

(http://localhost:8000/#view=16.49/52.072292/4.339282):
<img width="737" height="421" alt="image"
src="https://github.com/user-attachments/assets/1ac90a58-9d54-40f4-9c14-e467783d2c1e"
/>
After extensive research and nerd sniping multiple friends I have come
to the conclusion that, to calculate the maximum power there is a factor
of 1/sqrt(2) missing.

The reasoning is as follows:
The voltage of the overhead wire is usually specified as effective
voltage, but the current is specified as peak amplitude.
The effective power is calculated by multiplying the effective voltage
with the effective current, which can be calculated by dividing peak
amplitude by sqrt(2).
Therefore, to calculate the effective power from the available data the
formula has to be:
```
maximum effective power = effective voltage * peak maximum current / sqrt(2)
```

This is the first time I have worked with this codebase, I hope I did it
correctly.

Cheers

---------

Co-authored-by: Hidde Wieringa <hidde@hiddewieringa.nl>
<figure>
<figcaption>Screenshot of
https://openrailwaymap.app/#view=13.21/41.39035/2.15109&style=operator
on 4th February 2026</figcaption>
<img width="1920" height="918" alt="The image shows stations in the city
of Barcelona, showcasing the operator layer on OpenRailwayMap. Most show
operators are displayed in a green or blue color, with little contrast
between them."
src="https://github.com/user-attachments/assets/874caf6e-a360-4282-bca8-37179716e11e"
/>
</figure>


Currently, TMB is shown in green/blue. This PR would change the operator
color to red (the TMB logo is red, as is the Barcelona Metro logo),
creating a contrast with the neon-green FGC and green Adif.
Fixes #764

Addition of news of changes between October 2025 and January 2026. Wow,
this is a lot 😄.

In addition, the "new news" bubble will only show when the entries are
modified. So when the text, images or links in a news item are modified
the content is considered unchanged.

<img width="1430" height="1114" alt="image"
src="https://github.com/user-attachments/assets/e53e5ecb-6549-4bdc-ba15-0aea9f1d1309"
/>
Part of #413 

Changes:
- Add a new map layer: routes
- Show the amount of routes on a single line

Germany rendering with colors for the amount of routes on a line:
<img width="509" height="670" alt="image"
src="https://github.com/user-attachments/assets/2cb6eaa9-5176-4f42-bcab-0e71d85a2c9f"
/>

UK rendering:
<img width="1431" height="1116" alt="image"
src="https://github.com/user-attachments/assets/8b10a7f2-0a8d-4ee7-8014-40af095bda90"
/>

The Netherlands
(http://localhost:8000/#view=5.89/50.956/6.115&style=route):
<img width="426" height="495" alt="image"
src="https://github.com/user-attachments/assets/aff0d54c-b5ea-4500-87e9-9915ebd2152b"
/>
<img width="1034" height="1060" alt="image"
src="https://github.com/user-attachments/assets/5b1ccbe8-5cef-4d7c-b70a-58dc7495fa1f"
/>
From the documentation and tagging implemented with
#587.

The tagging is currently implemented in three countries: Belgium, Poland
and Spain
(https://wiki.openstreetmap.org/w/index.php?search=%22railway%3Asignal%3Aslope%22&title=Special%3ASearch&go=Go).

BE
(http://localhost:8000/#view=18.59/50.6071712/4.1410327&style=signals):
<img width="1038" height="610" alt="image"
src="https://github.com/user-attachments/assets/36a44ad1-7194-4779-ba36-4dd89f95e5eb"
/>

PL
(http://localhost:8000/#view=15.69/53.754716/20.503926&style=signals):
<img width="843" height="1068" alt="image"
src="https://github.com/user-attachments/assets/e1a791e1-cdcf-4753-8100-c4ba9c639ab0"
/>

ES has icons but no tagged signals.
Fixes #781.

For zooms 13 and higher, sites and junctions will not show station
bubbles, but keep showing their small indicator icon and the name, like
for lower zooms.

(http://localhost:8000/#view=11.48/51.6483/0.3384):
<img width="625" height="378" alt="image"
src="https://github.com/user-attachments/assets/142bf1ab-12ed-4d7d-a9ab-6953ce378734"
/>
<img width="625" height="378" alt="image"
src="https://github.com/user-attachments/assets/f20e6e85-8724-4dee-a99f-32a7060cb8b5"
/>
<img width="1359" height="1129" alt="image"
src="https://github.com/user-attachments/assets/4835f337-b829-4eed-97ee-49bb4b7ef93e"
/>

(http://localhost:8000/#view=14.15/51.13306/0.90364):
<img width="1359" height="1129" alt="image"
src="https://github.com/user-attachments/assets/0362ceb6-d085-4689-9810-62baca91b533"
/>

(http://localhost:8000/#view=15.5/48.204476/16.238709/22.5):
<img width="1765" height="931" alt="image"
src="https://github.com/user-attachments/assets/68640e0f-db6e-485d-9f9c-5b79de8a69f5"
/>

(http://localhost:8000/#view=15.25/48.177383/16.286372/22.5):
<img width="1765" height="931" alt="image"
src="https://github.com/user-attachments/assets/7a607c01-9bcb-4f1f-b981-4d7034d494c2"
/>


Operator layer:
<img width="954" height="594" alt="image"
src="https://github.com/user-attachments/assets/94dc9f53-2bb6-4f7f-85aa-dc3c155bfdd3"
/>


Routes layer:
<img width="954" height="594" alt="image"
src="https://github.com/user-attachments/assets/95bba9ca-88f3-48df-9291-d661bb4aaecf"
/>
…812)

Found during testing of
#808 (review).

The signal feature (determined by the `railway` tag) was not output
correctly, and for some signal icons the `example` was used in the
feature catalog, failing the lookup of the feature name.

Before:
<img width="520" height="688" alt="image"
src="https://github.com/user-attachments/assets/3dfd336b-4288-4b29-a15f-dc4e66122a44"
/>

After:
<img width="381" height="564" alt="image"
src="https://github.com/user-attachments/assets/9292ab63-eefe-43f7-bc90-d587960d8160"
/>
This adds the most common British speed signal.

Documentation:
https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging_in_the_United_Kingdom#Permissible_Speed_Indicator

Example node: https://www.openstreetmap.org/node/13472176904

Rendering including metric signs (black), directional arrows and signs
without speed value:
<img width="1096" height="857" alt="image"
src="https://github.com/user-attachments/assets/46a01f37-afee-48a2-8ebf-eaf4493ae2a1"
/>
Same as #806, now for Switzerland. Part of #587.

(http://localhost:8000/#view=16.62/46.677137/8.592248&style=signals):
<img width="601" height="587" alt="image"
src="https://github.com/user-attachments/assets/def5e757-a67b-4742-8eb6-58dab7cf8d77"
/>
Fixes #664 

The legend has a selection to allow the user to choose between showing
all features in the legend, or filter the features specific to a certain
country.

The countries are determined per layers. Not all layers have
country-specific features.

The legend is also enlarged a bit to allow more text to show.

The chosen option for showing all legend features or those for a
specific country, and the chosen country is stored in the configuration,
so when the page is reloaded the same country selection will be used.

Filtering the features in view is split off into #815. 

(http://localhost:8000/#view=14.4/47.53294/7.65284&style=signals):
<img width="1431" height="1114" alt="image"
src="https://github.com/user-attachments/assets/48dd0eb8-125f-41d0-bd4a-9d861c3e57a4"
/>

Operator country selection:
<img width="1431" height="743" alt="image"
src="https://github.com/user-attachments/assets/180a521e-36e1-4cf7-880e-253ca626e485"
/>

<img width="466" height="545" alt="image"
src="https://github.com/user-attachments/assets/d0578f8b-7c46-4f19-8a82-e7d955f94258"
/>

Infrastructure layer has no country-specific features, selector is
disabled:
<img width="901" height="514" alt="image"
src="https://github.com/user-attachments/assets/b1e04ba3-78c6-477e-a953-6862056d038b"
/>
This allows offline starting of the Docker services. Without an image
pin, the Docker daemon will try to fetch the (possibly updated) image
digest before starting the service.

This can be integrated with Renovate in the future, to automatically
receive pull requests to update the source images.
Fixes #784 

Followup on #810

Allow filtering the legend to show only the features in the current
view.

When the map is zoomed or panned, the legend updates itself.

Note that the speed, gauge, loading gauge and electrification railway
lines are all shown in the legend. Filtering the railway lines in the
legend on a variable value is not possible yet at the moment.

*View diff with whitespace disabled because of the large amount of
indenting changes:
https://github.com/hiddewie/OpenRailwayMap-vector/pull/815/changes?w=1*

<img width="1430" height="743" alt="image"
src="https://github.com/user-attachments/assets/7fbd58d6-ce48-4267-856e-b5019b9fb7b6"
/>

(http://localhost:8000/#view=16.88/47.574013/7.603&style=signals):
<img width="1428" height="745" alt="image"
src="https://github.com/user-attachments/assets/07ba3f93-e304-44d6-a18c-db2c6bf2e8dd"
/>

(http://localhost:8000/#view=16.54/47.475992/7.745872):
<img width="1431" height="1111" alt="image"
src="https://github.com/user-attachments/assets/bebd52da-6f8d-43f2-b405-32a02f1272e2"
/>

(http://localhost:8000/#view=16.42/47.540417/7.963811&style=operator):
<img width="1429" height="1107" alt="image"
src="https://github.com/user-attachments/assets/9064df6a-f319-4cbf-a1d7-45abefffc87d"
/>

Features with variables (speed signals)
(http://localhost:8000/#view=16.17/47.540743/7.961868&style=speed):
<img width="1430" height="1087" alt="image"
src="https://github.com/user-attachments/assets/8dde10d5-8e04-40b7-8de6-db5919f7b318"
/>
Fixes #816

Other features with the same type but of a different class were also
shown. In this case proposed highways instead of proposed railways.

(http://localhost:8000/#view=13.21/49.28597/-123.09964&date=1972):

Before:
<img width="1431" height="1114" alt="image"
src="https://github.com/user-attachments/assets/92ba946f-a138-4fcf-96c5-11d1711f9535"
/>


After:
<img width="1431" height="1114" alt="image"
src="https://github.com/user-attachments/assets/609b93e7-2c99-415f-af69-3e4eb2a07dda"
/>
Part of #763

See
https://wiki.openstreetmap.org/wiki/OpenRailwayMap/Tagging_in_Belgium#Substitute_signals

Render the clearing crown and light on main signals (normal and opposite
regime).

<img width="907" height="830" alt="image"
src="https://github.com/user-attachments/assets/2528c8ba-a6cb-496e-8d2f-3a0d31c7e1cc"
/>
Nakaner pushed a commit that referenced this pull request Feb 22, 2026
Add test cases for web and tiles

Fixes #86 

Tasks:

- [x] Download a small piece of OSM data (Berlin is already cached from
the API tests)
- [x]     Import the data, verify import succeeded
- [x]     Generate tiles, verify tiles build
- [x] start martin-cp and verify tile requests work
- [x]     Start Martin
- [x]     Start API
- [x]     Start proxy
- [x] Run web browser tests, viewing the page, making screenshots,
searching and asserting some basic things on the screen.
- [x] Reuse built artifacts
hiddewie and others added 9 commits February 22, 2026 11:00
Currently they are rather white in color, making them harder to
distinguish from Zs3 signals.
To reduce the imported data a tiny bit.
Fixes #802.

Currently routes and search results cannot be deselected once shown.
This pull request adds a button that is shown when a route is selected.
Clicking the button will remove the route from the map again.

The "hide route" button has a pink outline, just like the routes, to
associate it with the routes. The "hide search results" button has a
green outline when there are search results, to associate it with the
search.

Route:
<img width="1115" height="401" alt="image"
src="https://github.com/user-attachments/assets/d9e92474-a582-4349-9fa8-80a072cfca9a"
/>

Search results:
<img width="1433" height="646" alt="image"
src="https://github.com/user-attachments/assets/1fa17dd6-0d49-470e-8036-e1bf522c234f"
/>
<img width="706" height="418" alt="image"
src="https://github.com/user-attachments/assets/159105a0-c3f0-4d3b-9fb9-b2ff0cccf0b1"
/>
Fixes #827

This is a regression from
#824.

Booleans were instead returned as optional booleans, `true`, `false` or
`null`. The `null` values were not possible before, creating errors
where the map style expected a boolean and not a null value.

Switches and catenary masts work again:
<img width="655" height="386" alt="image"
src="https://github.com/user-attachments/assets/c091f6cb-6e47-4a65-911a-3278aa2270cf"
/>
<img width="779" height="549" alt="image"
src="https://github.com/user-attachments/assets/71eb6f2e-f335-4603-98c0-77adefb10ad2"
/>
From comment in
#544 (comment).

Currently wiki languages are interpreted as countries, to display an
emoji flag. But the emoji flag system only supports countries, not
languages. As such, translation is error-prone. The easiest is to not
display the flag at all for Wikipedia links.

Reverts most of
#556

(http://localhost:8000/#view=15.65/52.339521/4.894221):

Before:
<img width="1000" height="738" alt="image"
src="https://github.com/user-attachments/assets/50a2bdec-c3d5-4915-b1df-63dc0e2fd637"
/>

After:
<img width="1000" height="738" alt="image"
src="https://github.com/user-attachments/assets/09590193-2f77-44cd-bca1-9f8aa2715622"
/>
- Added icons for primary signal states: C (Carré), Cv (Carré violet), S
(Sémaphore), D (Disque), A (Avertissement), and ID (Indicateurs de
directions)
- Updated French parsing in signals_railway_signals.yaml to always
display the most restrictive primary state for each signal
- Ensures the rendered icon always represents the signal's primary
state, independent of the target type

---------

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

Implementation of
https://wiki.openstreetmap.org/wiki/Cs:Original_tagging_of_Czech_railway_signals

Also see
#391 (comment)

Icons designed by
https://openstreetbrowser.org/#map=17/49.75606/13.50031&basemap=hot&categories=custom/d489fc1c1463352a6159941529e8c671

## Testing

### Station distant signals
(http://localhost:8000/#view=18.14/49.755008/13.501037&style=signals):
<img width="685" height="423" alt="image"
src="https://github.com/user-attachments/assets/d1b41ab8-2c91-478e-bdad-197d925f295a"
/>

(http://localhost:8000/#view=17.83/49.778896/13.718423&style=signals):
<img width="685" height="423" alt="image"
src="https://github.com/user-attachments/assets/8154dc94-72ce-422e-a33a-29bf9cdab011"
/>

Shortened
(http://localhost:8000/#view=16.03/49.762986/13.501773&style=signals):
<img width="813" height="534" alt="image"
src="https://github.com/user-attachments/assets/92a3aa98-339a-459f-96cf-b0402b364828"
/>


### Stop signals

(http://localhost:8000/#view=16.2/49.767235/13.505628&style=signals):
<img width="499" height="517" alt="image"
src="https://github.com/user-attachments/assets/93ce7c6d-48ed-44b0-a877-d40407d7cd83"
/>

(http://localhost:8000/#view=18.67/49.7793714/13.5029451&style=signals):
<img width="552" height="703" alt="image"
src="https://github.com/user-attachments/assets/5a966fa0-8aa5-4197-9840-733d7d80ff90"
/>

(http://localhost:8000/#view=16.69/49.825953/13.578226&style=signals):
<img width="518" height="441" alt="image"
src="https://github.com/user-attachments/assets/c5d51ed3-a679-4997-bea2-a2c9656c6da1"
/>


### Whistle

(http://localhost:8000/#view=17.07/49.794716/13.490002&style=signals):
<img width="813" height="534" alt="image"
src="https://github.com/user-attachments/assets/fb9ce218-292f-478f-8cbc-cf00db2b2b4d"
/>

### Resetting switch

(http://localhost:8000/#view=18.48/49.8284769/13.5750067&style=signals):
<img width="574" height="655" alt="image"
src="https://github.com/user-attachments/assets/9e202b7a-cd8e-48e8-a45d-74eea638c50d"
/>

### Crossing

(http://localhost:8000/#view=17.2/49.823982/13.579852&style=signals):
<img width="700" height="634" alt="image"
src="https://github.com/user-attachments/assets/11afb905-f07d-4cd1-a847-58db73a2ce9f"
/>

### Shunting 

Derailers with semaphore shunting signals
(http://localhost:8000/#view=17.38/49.787501/13.495874&style=signals):
<img width="535" height="580" alt="image"
src="https://github.com/user-attachments/assets/a3162fd1-6e01-413d-b8ad-c73f922be44c"
/>

### Distant signals

Normal
(http://localhost:8000/#view=17.6/49.764124/13.502116&style=signals):
<img width="998" height="560" alt="image"
src="https://github.com/user-attachments/assets/f163e5bf-652d-4319-a16d-b82fe7cbc6dc"
/>

Repeated
(http://localhost:8000/#view=18.17/49.752077/13.509463&style=signals):
<img width="998" height="560" alt="image"
src="https://github.com/user-attachments/assets/d32c8735-75cc-4274-a208-01e168998c46"
/>

Shortened and entry distant signals do not exit yet.

### Main / Combined signals in station

(http://localhost:8000/#view=16.72/49.701314/13.667077&style=signals):
<img width="1420" height="865" alt="image"
src="https://github.com/user-attachments/assets/84b5ac67-138d-4645-b001-9383f3786d7f"
/>

(http://localhost:8000/#view=17.06/49.74398/13.389809&style=signals):
<img width="1420" height="865" alt="image"
src="https://github.com/user-attachments/assets/5af23a2b-490a-4fa2-bbef-7b32231780f2"
/>


Sign, circle
(http://localhost:8000/#view=17.39/49.76435/13.401474&style=signals):
<img width="991" height="630" alt="image"
src="https://github.com/user-attachments/assets/bbe7a16c-1184-46e0-b6ea-2cc02a0ea4d7"
/>
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.