From 1fd817d9d63bcb29b13ef22a3df719a09d2e742c Mon Sep 17 00:00:00 2001 From: Hidde Wieringa Date: Wed, 28 Dec 2022 17:03:15 +0100 Subject: [PATCH 1/2] Support NL main and distant signals Departure signals Departure signals revert root departure remove unneeded distant symbols without pole Max speed light signals NL Repeated main light Fix a missing departure signal tagging combination revert maxspeed_signals.mss whitespace changes another one Main repeated states check Remove NL:light as light forms because of invalid tagging order Add support for signal categories like NL:voor NL:hoofd en NL:snelheid Refactor to NL:hoofd for main signals with speed limit box Squashed commit of the following: commit 339512cd7b8ffee05db75b0f23f9979591a79809 Author: Hidde Wieringa Date: Thu Oct 26 20:39:31 2023 +0200 Update resource URLs as well commit c6d63a92db3019196167e4d3a27509fc2d4c63c5 Author: Hidde Wieringa Date: Thu Oct 26 20:34:15 2023 +0200 Modify Dutch icons to SVG commit 4a2a444e8051940337e2f4b84c2bbd549becc83f Author: Hidde Wieringa Date: Wed Dec 28 17:03:15 2022 +0100 Support NL main and distant signals Departure signals Departure signals revert root departure remove unneeded distant symbols without pole Max speed light signals NL Repeated main light Fix a missing departure signal tagging combination revert maxspeed_signals.mss whitespace changes another one Main repeated states check Remove NL:light as light forms because of invalid tagging order Clean up PNG files --- maxspeed_signals.mss | 9 + signals.mml | 14 +- signals.mss | 77 ++ symbols/nl/departure.svg | 130 ++++ symbols/nl/distant_light.svg | 134 ++++ symbols/nl/main_light.svg | 105 +++ symbols/nl/main_repeated_light.svg | 263 +++++++ symbols/nl/speed_limit_light.svg | 1132 ++++++++++++++++++++++++++++ 8 files changed, 1863 insertions(+), 1 deletion(-) create mode 100644 symbols/nl/departure.svg create mode 100644 symbols/nl/distant_light.svg create mode 100644 symbols/nl/main_light.svg create mode 100644 symbols/nl/main_repeated_light.svg create mode 100644 symbols/nl/speed_limit_light.svg diff --git a/maxspeed_signals.mss b/maxspeed_signals.mss index 4ceeac28..a74124b7 100644 --- a/maxspeed_signals.mss +++ b/maxspeed_signals.mss @@ -884,5 +884,14 @@ marker-width: 11; marker-height: 16; } + + /**********************************************/ + /* NL speed limit light (part of main signal) */ + /**********************************************/ + ["feature"="NL"]["signal_speed_limit_form"="light"] { + marker-width: 16; + marker-height: 16; + marker-file: url('symbols/nl/speed_limit_light.svg'); + } } } diff --git a/signals.mml b/signals.mml index 7796e02f..bcf26b52 100644 --- a/signals.mml +++ b/signals.mml @@ -294,7 +294,9 @@ Layer: tags->'railway:signal:crossing_distant', tags->'railway:signal:crossing', tags->'railway:signal:ring', - tags->'railway:signal:whistle' + tags->'railway:signal:whistle', + tags->'railway:signal:departure', + tags->'railway:signal:main_repeated' ) AS feature, tags->'railway:signal:passing:caption' AS passing_caption, tags->'railway:signal:stop:caption' AS stop_caption, @@ -315,6 +317,7 @@ Layer: tags->'railway:signal:crossing:deactivated' AS crossing_deactivated, tags->'railway:signal:ring:deactivated' AS ring_deactivated, tags->'railway:signal:whistle:deactivated' AS whistle_deactivated, + tags->'railway:signal:departure:deactivated' AS departure_deactivated, tags->'railway:signal:combined:form' AS combined_form, tags->'railway:signal:main:form' AS main_form, tags->'railway:signal:distant:form' AS distant_form, @@ -330,6 +333,7 @@ Layer: tags->'railway:signal:crossing:form' AS crossing_form, tags->'railway:signal:ring:form' AS ring_form, tags->'railway:signal:whistle:form' AS whistle_form, + tags->'railway:signal:departure:form' AS departure_form, tags->'railway:signal:combined:height' AS combined_height, tags->'railway:signal:main:height' AS main_height, tags->'railway:signal:distant:height' AS distant_height, @@ -344,6 +348,7 @@ Layer: tags->'railway:signal:crossing:height' AS crossing_height, tags->'railway:signal:ring:height' AS ring_height, tags->'railway:signal:whistle:height' AS whistle_height, + tags->'railway:signal:departure:height' AS departure_height, tags->'railway:signal:combined:states' AS combined_states, tags->'railway:signal:main:states' AS main_states, tags->'railway:signal:distant:states' AS distant_states, @@ -358,6 +363,8 @@ Layer: tags->'railway:signal:crossing:states' AS crossing_states, tags->'railway:signal:ring:states' AS ring_states, tags->'railway:signal:whistle:states' AS whistle_states, + tags->'railway:signal:departure:states' AS departure_states, + tags->'railway:signal:main_repeated:states' AS main_repeated_states, tags->'railway:signal:combined:repeated' AS combined_repeated, tags->'railway:signal:main:repeated' AS main_repeated, tags->'railway:signal:distant:repeated' AS distant_repeated, @@ -372,6 +379,7 @@ Layer: tags->'railway:signal:crossing:repeated' AS crossing_repeated, tags->'railway:signal:ring:repeated' AS ring_repeated, tags->'railway:signal:whistle:repeated' AS whistle_repeated, + tags->'railway:signal:departure:repeated' AS departure_repeated, tags->'railway:signal:combined:shortened' AS combined_shortened, tags->'railway:signal:main:shortened' AS main_shortened, tags->'railway:signal:distant:shortened' AS distant_shortened, @@ -386,6 +394,7 @@ Layer: tags->'railway:signal:crossing:shortened' AS crossing_shortened, tags->'railway:signal:ring:shortened' AS ring_shortened, tags->'railway:signal:whistle:shortened' AS whistle_shortened, + tags->'railway:signal:departure:shortened' AS departure_shortened, tags->'railway:signal:combined:only_transit' AS combined_only_transit, tags->'railway:signal:main:only_transit' AS main_only_transit, tags->'railway:signal:distant:only_transit' AS distant_only_transit, @@ -400,6 +409,7 @@ Layer: tags->'railway:signal:crossing:only_transit' AS crossing_only_transit, tags->'railway:signal:ring:only_transit' AS ring_only_transit, tags->'railway:signal:whistle:only_transit' AS whistle_only_transit, + tags->'railway:signal:departure:only_transit' AS departure_only_transit, tags->'railway:signal:combined:type' AS combined_type, tags->'railway:signal:main:type' AS main_type, tags->'railway:signal:distant:type' AS distant_type, @@ -414,6 +424,7 @@ Layer: tags->'railway:signal:crossing:type' AS crossing_type, tags->'railway:signal:ring:type' AS ring_type, tags->'railway:signal:whistle:type' AS whistle_type, + tags->'railway:signal:departure:type' AS departure_type, tags->'railway:signal:train_protection:shape' AS train_protection_shape FROM openrailwaymap_osm_signals WHERE @@ -422,6 +433,7 @@ Layer: ORDER BY -- distant signals are less important, signals for slower speeds are more important (CASE + WHEN railway_has_key(tags, 'railway:signal:departure') THEN 15000 WHEN railway_has_key(tags, 'railway:signal:main') THEN 10000 WHEN railway_has_key(tags, 'railway:signal:combined') THEN 10000 WHEN railway_has_key(tags, 'railway:signal:distant') THEN 9000 diff --git a/signals.mss b/signals.mss index fb1103e6..ad2bad3e 100644 --- a/signals.mss +++ b/signals.mss @@ -842,6 +842,25 @@ Format details: } } + /****************************/ + /* NL distant light signals */ + /****************************/ + ["feature"="NL"]["distant_form"="light"] { + ::text { + text-name: [ref]; + text-dy: 12; + text-fill: @signal-text-fill; + text-halo-radius: @signal-text-halo-radius; + text-halo-fill: @signal-text-halo-fill; + text-face-name: @bold-fonts; + text-size: 10; + } + + marker-width: 9; + marker-height: 19; + marker-file: url('symbols/nl/distant_light.svg'); + } + /************************************************/ /* DE distant signal replacement by sign So 106 */ /* AT Kreuztafel */ @@ -1325,4 +1344,62 @@ Format details: } } } + + /*************************/ + /* NL main light signals */ + /*************************/ + ["feature"="NL"]["main_form"="light"] { + ::text { + text-name: [ref]; + text-dy: 12; + text-fill: @signal-text-fill; + text-halo-radius: @signal-text-halo-radius; + text-halo-fill: @signal-text-halo-fill; + text-face-name: @bold-fonts; + text-size: 10; + } + + marker-width: 9; + marker-height: 19; + marker-file: url('symbols/nl/main_light.svg'); + } + + /**********************************/ + /* NL repeated main light signals */ + /**********************************/ + ["feature"="NL"]["main_repeated_states"="NL:272;NL:273"] { + ::text { + text-name: [ref]; + text-dy: 12; + text-fill: @signal-text-fill; + text-halo-radius: @signal-text-halo-radius; + text-halo-fill: @signal-text-halo-fill; + text-face-name: @bold-fonts; + text-size: 10; + } + + marker-width: 12; + marker-height: 18; + marker-file: url('symbols/nl/main_repeated_light.svg'); + } + + /******************************/ + /* NL departure light signals */ + /******************************/ + ["feature"="NL"]["departure_form"="light"], + ["feature"="NL:VL"]["departure_form"="light"] { + ::text { + text-name: [ref]; + text-dy: 12; + text-fill: @signal-text-fill; + text-halo-radius: @signal-text-halo-radius; + text-halo-fill: @signal-text-halo-fill; + text-face-name: @bold-fonts; + text-size: 10; + } + + marker-width: 9; + marker-height: 18; + marker-file: url('symbols/nl/departure.svg'); + } } diff --git a/symbols/nl/departure.svg b/symbols/nl/departure.svg new file mode 100644 index 00000000..053c8571 --- /dev/null +++ b/symbols/nl/departure.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/symbols/nl/distant_light.svg b/symbols/nl/distant_light.svg new file mode 100644 index 00000000..d27153d2 --- /dev/null +++ b/symbols/nl/distant_light.svg @@ -0,0 +1,134 @@ + + + + diff --git a/symbols/nl/main_light.svg b/symbols/nl/main_light.svg new file mode 100644 index 00000000..36aa814e --- /dev/null +++ b/symbols/nl/main_light.svg @@ -0,0 +1,105 @@ + + + + diff --git a/symbols/nl/main_repeated_light.svg b/symbols/nl/main_repeated_light.svg new file mode 100644 index 00000000..bef0910b --- /dev/null +++ b/symbols/nl/main_repeated_light.svg @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/symbols/nl/speed_limit_light.svg b/symbols/nl/speed_limit_light.svg new file mode 100644 index 00000000..4b7777af --- /dev/null +++ b/symbols/nl/speed_limit_light.svg @@ -0,0 +1,1132 @@ + + + + From f1bad96ed3377181802ddbcc807bfdbe1b5ea42c Mon Sep 17 00:00:00 2001 From: Michael Reichert Date: Sat, 25 Nov 2023 18:51:12 +0100 Subject: [PATCH 2/2] Remove SVG filters from NL signal icons and simplify SVG code The icons are rendered very small. Therefore, a softening filter around the lights will not influence the rendered result. In addition, the filters are not supported by Mapnik. This commit removes dashed strokes from the lights, too. --- symbols/nl/departure.svg | 41 +- symbols/nl/distant_light.svg | 88 +-- symbols/nl/main_light.svg | 59 +- symbols/nl/main_repeated_light.svg | 230 +------ symbols/nl/speed_limit_light.svg | 977 ++--------------------------- 5 files changed, 70 insertions(+), 1325 deletions(-) diff --git a/symbols/nl/departure.svg b/symbols/nl/departure.svg index 053c8571..2e90ed82 100644 --- a/symbols/nl/departure.svg +++ b/symbols/nl/departure.svg @@ -34,45 +34,6 @@ inkscape:current-layer="layer1" inkscape:showpageshadow="2" inkscape:deskcolor="#d1d1d1" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + width="46.712044" + height="68.421356" + x="0.5765931" + y="0.44061947" />