Skip to content

Commit

Permalink
Support NL main and distant signals
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hiddewie committed Oct 21, 2023
1 parent 000a2ca commit 4a2a444
Show file tree
Hide file tree
Showing 8 changed files with 270 additions and 1 deletion.
9 changes: 9 additions & 0 deletions maxspeed_signals.mss
Original file line number Diff line number Diff line change
Expand Up @@ -881,5 +881,14 @@
marker-width: 11;
marker-height: 16;
}

/*****************************************/
/* NL speed limit light (no main signal) */
/*****************************************/
["feature"="NL"]["signal_speed_limit_form"="light"] {
marker-width: 16;
marker-height: 16;
marker-file: url('symbols/nl/speed_limit_light.png');
}
}
}
14 changes: 13 additions & 1 deletion signals.mml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,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,
Expand All @@ -302,6 +304,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,
Expand All @@ -316,6 +319,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,
Expand All @@ -330,6 +334,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,
Expand All @@ -344,6 +349,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,
Expand All @@ -358,6 +365,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,
Expand All @@ -372,6 +380,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,
Expand All @@ -386,6 +395,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,
Expand All @@ -400,6 +410,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
Expand All @@ -408,6 +419,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
Expand Down
77 changes: 77 additions & 0 deletions signals.mss
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,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.png');
}

/************************************************/
/* DE distant signal replacement by sign So 106 */
/* AT Kreuztafel */
Expand Down Expand Up @@ -1278,4 +1297,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.png');
}

/**********************************/
/* 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');
}
}
91 changes: 91 additions & 0 deletions symbols/nl/departure.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/nl/distant_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/nl/main_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions symbols/nl/main_repeated_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/nl/speed_limit_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4a2a444

Please sign in to comment.