Skip to content

Commit

Permalink
Move finnish signals to another file
Browse files Browse the repository at this point in the history
  • Loading branch information
besentv committed Apr 7, 2024
1 parent 083e3ff commit 09087ab
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 174 deletions.
1 change: 1 addition & 0 deletions signals.mml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Stylesheet:
- signals.mss
- signals_at.mss
- signals_de.mss
- signals_fi.mss
- signals_deactivated.mss
- signal_boxes.mss
- train_protection.mss
Expand Down
174 changes: 0 additions & 174 deletions signals.mss
Original file line number Diff line number Diff line change
Expand Up @@ -19,56 +19,6 @@ Format details:

#railway_signals[zoom>=14] {

/**************************/
/* FI crossing signal To */
/**************************/
[zoom>=15]["feature"="FI:To"]["crossing_form"="light"] {
marker-file: url('symbols/fi/to1.svg');
marker-width: 7;
marker-height: 12;
marker-allow-overlap: true;
}

/*******************************************/
/* FI shunting light signals type Ro (new) */
/*******************************************/
[zoom>=17]["feature"="FI:Ro"]["shunting_states"=~"^(.*;)?FI:Ro0(;.*)?$"]["shunting_form"="light"] {
marker-file: url('symbols/fi/ro0-new.svg');
marker-width: 11;
marker-height: 12;
marker-allow-overlap: true;

::text {
text-name: [ref];
text-dy: 11;
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;
}
}

/******************************************************/
/* FI minor light signals type Lo at moveable bridges */
/******************************************************/
[zoom>=17]["feature"="FI:Lo"]["minor_states"=~"^(.*;)?FI:Lo0(;.*)?$"]["minor_form"="light"] {
marker-file: url('symbols/fi/lo0.svg');
marker-width: 7;
marker-height: 12;
marker-allow-overlap: true;

::text {
text-size: 10;
text-name: [ref];
text-dy: 11;
text-fill: @signal-text-fill;
text-halo-radius: @signal-text-halo-radius;
text-halo-fill: @signal-text-halo-fill;
text-face-name: @bold-fonts;
}
}

/************************************/
/* NL ETCS stopplaatsmarkering 227b */
/************************************/
Expand All @@ -93,128 +43,4 @@ Format details:
marker-file: url('symbols/etcs-stop-marker-triangle-left.svg');
}
}

/****************************/
/* FI distant light signals */
/****************************/
["feature"="FI:Eo"]["distant_form"="light"],
["feature"="FI:Eo-v"]["distant_form"="light"] {
["distant_repeated"!="yes"] {
::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;
}

["feature"="FI:Eo"] {
marker-width: 9;
marker-height: 15;
marker-file: url('symbols/fi/eo0-new.svg');
}

["feature"="FI:Eo-v"] {
marker-width: 10;
marker-height: 10;
marker-file: url('symbols/fi/eo0-old.svg');
}

/* can display Eo 1 (expect proceed) */
/* new type */
["distant_states"=~"^(.*;)?FI:Eo1(;.*)?$"] {
marker-file: url('symbols/fi/eo1-new.svg');
}
/* old type */
["distant_states"=~"^(.*;)?FI:Eo1(;.*)?$"] {
marker-file: url('symbols/fi/eo1-old.svg');
}

/* can display Eo 2 (expect proceed) -- new type */
["distant_states"=~"^(.*;)?FI:Eo2(;.*)?$"] {
marker-file: url('symbols/fi/eo2-new.svg');
}
}
}

/*************************/
/* FI main light signals */
/*************************/
/* new type */
["feature"="FI:Po"]["main_form"="light"] {
marker-file: url('symbols/fi/po0-new.svg');
marker-width: 9;
marker-height: 15;
marker-allow-overlap: true;

::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;
}

/* can display Po1 */
["main_states"=~"^(.*;)?FI:Po1(;.*)?$"] {
marker-file: url('symbols/fi/po1-new.svg');
}

/* can display Po2 */
["main_states"=~"^(.*;)?FI:Po2(;.*)?$"] {
marker-file: url('symbols/fi/po2-new.svg');
}
}

/* old type */
["feature"="FI:Po-v"]["main_form"="light"] {
marker-file: url('symbols/fi/po0-old.svg');
marker-width: 7;
marker-height: 16;
marker-allow-overlap: true;

::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;
}

/* can display Po1 */
["main_states"=~"^(.*;)?FI:Po1(;.*)?$"] {
marker-file: url('symbols/fi/po1-old.svg');
}

/* can display Po2 */
["main_states"=~"^(.*;)?FI:Po2(;.*)?$"] {
marker-file: url('symbols/fi/po2-old.svg');
}
}

/************************************/
/* FI combined block signal type So */
/************************************/
["feature"="FI:So"]["combined_form"="light"]["combined_states"=~"^(.*;)?FI:Po1(;.*)?$"]["combined_states"=~"^(.*;)?FI:Eo1(;.*)?$"] {
marker-file: url('symbols/fi/eo1-po1-combined-block.svg');
marker-width: 12;
marker-height: 15;
marker-allow-overlap: true;

::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;
}
}
}
195 changes: 195 additions & 0 deletions signals_fi.mss
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
/*
* OpenRailwayMap CartoCSS definitions for Finnish signals.
*
* Copyright (C) 2024 Bernhard Kölbl
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#railway_signals[zoom>=14] {

/*************************/
/* FI main light signals */
/*************************/
/* new type */
["feature"="FI:Po"]["main_form"="light"] {
marker-file: url('symbols/fi/po0-new.svg');
marker-width: 9;
marker-height: 15;
marker-allow-overlap: true;

::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;
}

/* can display Po1 */
["main_states"=~"^(.*;)?FI:Po1(;.*)?$"] {
marker-file: url('symbols/fi/po1-new.svg');
}

/* can display Po2 */
["main_states"=~"^(.*;)?FI:Po2(;.*)?$"] {
marker-file: url('symbols/fi/po2-new.svg');
}
}

/* old type */
["feature"="FI:Po-v"]["main_form"="light"] {
marker-file: url('symbols/fi/po0-old.svg');
marker-width: 7;
marker-height: 16;
marker-allow-overlap: true;

::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;
}

/* can display Po1 */
["main_states"=~"^(.*;)?FI:Po1(;.*)?$"] {
marker-file: url('symbols/fi/po1-old.svg');
}

/* can display Po2 */
["main_states"=~"^(.*;)?FI:Po2(;.*)?$"] {
marker-file: url('symbols/fi/po2-old.svg');
}
}

/****************************/
/* FI distant light signals */
/****************************/
["feature"="FI:Eo"]["distant_form"="light"],
["feature"="FI:Eo-v"]["distant_form"="light"] {
["distant_repeated"!="yes"] {
::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;
}

["feature"="FI:Eo"] {
marker-width: 9;
marker-height: 15;
marker-file: url('symbols/fi/eo0-new.svg');
}

["feature"="FI:Eo-v"] {
marker-width: 10;
marker-height: 10;
marker-file: url('symbols/fi/eo0-old.svg');
}

/* can display Eo 1 (expect proceed) */
/* new type */
["distant_states"=~"^(.*;)?FI:Eo1(;.*)?$"] {
marker-file: url('symbols/fi/eo1-new.svg');
}
/* old type */
["distant_states"=~"^(.*;)?FI:Eo1(;.*)?$"] {
marker-file: url('symbols/fi/eo1-old.svg');
}

/* can display Eo 2 (expect proceed) -- new type */
["distant_states"=~"^(.*;)?FI:Eo2(;.*)?$"] {
marker-file: url('symbols/fi/eo2-new.svg');
}
}
}

/************************************/
/* FI combined block signal type So */
/************************************/
["feature"="FI:So"]["combined_form"="light"]["combined_states"=~"^(.*;)?FI:Po1(;.*)?$"]["combined_states"=~"^(.*;)?FI:Eo1(;.*)?$"] {
marker-file: url('symbols/fi/eo1-po1-combined-block.svg');
marker-width: 12;
marker-height: 15;
marker-allow-overlap: true;

::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;
}
}

/*******************************************/
/* FI shunting light signals type Ro (new) */
/*******************************************/
[zoom>=17]["feature"="FI:Ro"]["shunting_states"=~"^(.*;)?FI:Ro0(;.*)?$"]["shunting_form"="light"] {
marker-file: url('symbols/fi/ro0-new.svg');
marker-width: 11;
marker-height: 12;
marker-allow-overlap: true;

::text {
text-name: [ref];
text-dy: 11;
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;
}
}

/******************************************************/
/* FI minor light signals type Lo at moveable bridges */
/******************************************************/
[zoom>=17]["feature"="FI:Lo"]["minor_states"=~"^(.*;)?FI:Lo0(;.*)?$"]["minor_form"="light"] {
marker-file: url('symbols/fi/lo0.svg');
marker-width: 7;
marker-height: 12;
marker-allow-overlap: true;

::text {
text-size: 10;
text-name: [ref];
text-dy: 11;
text-fill: @signal-text-fill;
text-halo-radius: @signal-text-halo-radius;
text-halo-fill: @signal-text-halo-fill;
text-face-name: @bold-fonts;
}
}

/**************************/
/* FI crossing signal To */
/**************************/
[zoom>=15]["feature"="FI:To"]["crossing_form"="light"] {
marker-file: url('symbols/fi/to1.svg');
marker-width: 7;
marker-height: 12;
marker-allow-overlap: true;
}
}

0 comments on commit 09087ab

Please sign in to comment.