Skip to content

Commit

Permalink
AT missing signals (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie authored Sep 2, 2024
1 parent 50a1734 commit 56b98dd
Show file tree
Hide file tree
Showing 31 changed files with 454 additions and 105 deletions.
141 changes: 140 additions & 1 deletion features/signals_railway_signals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ signals_railway_signals:
- 'railway:signal:shunting'
- 'railway:signal:shunting:form'
- 'railway:signal:shunting:states'
- 'railway:signal:shunting:height'
- 'railway:signal:snowplow'
- 'railway:signal:snowplow:form'
- 'railway:signal:snowplow:type'
Expand Down Expand Up @@ -100,7 +101,11 @@ signals_railway_signals:

- description: Verschubverbot
country: AT
icon: { default: 'at/verschubverbot-aufgehoben' }
icon:
match: 'railway:signal:shunting:height'
cases:
- { regex: '^dwarf$', value: 'at/verschubverbot-aufgehoben-dwarf', description: 'zwerg' }
default: 'at/verschubverbot-aufgehoben'
tags:
- { tag: 'railway:signal:shunting', value: 'AT-V2:verschubsignal' }
- { tag: 'railway:signal:shunting:form', value: 'light' }
Expand Down Expand Up @@ -139,6 +144,24 @@ signals_railway_signals:
- { tag: 'railway:signal:distant', value: 'AT-V2:vorsignal' }
- { tag: 'railway:signal:distant:form', value: 'semaphore' }

- description: Hauptsignal (abfahrt)
country: AT
icon: { default: 'at/hauptsignal-abfahrt' }
tags:
- { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' }
- { tag: 'railway:signal:main:form', value: 'light' }
- { tag: 'railway:signal:departure', value: 'AT-V2:abfahrt' }
- { tag: 'railway:signal:departure:form', value: 'light' }

- description: Hauptsignal (fahrerlaubnis)
country: AT
icon: { default: 'at/hauptsignal-fahrerlaubnis' }
tags:
- { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' }
- { tag: 'railway:signal:main:form', value: 'light' }
- { tag: 'railway:signal:departure', value: 'AT-V2:fahrerlaubnissignal' }
- { tag: 'railway:signal:departure:form', value: 'light' }

- description: Hauptsignal (light)
country: AT
icon:
Expand Down Expand Up @@ -192,6 +215,122 @@ signals_railway_signals:
- { tag: 'railway:signal:main', value: 'AT-V2:hauptsignal' }
- { tag: 'railway:signal:main:form', value: 'semaphore' }

- description: Bedarfshalt
country: AT
icon: { default: 'at/bedarfshalt' }
tags:
- { tag: 'railway:signal:stop_demand', value: 'AT:bedarfshalt-signal' }
- { tag: 'railway:signal:stop_demand:form', value: 'light' }

- description: Haltestellentafel
country: AT
icon: { default: 'de/ne6' }
tags:
- { tag: 'railway:signal:station_distant', value: 'AT-V2:haltestellentafel' }
- { tag: 'railway:signal:station_distant:form', value: 'sign' }

- description: Schutzsignal (abfahrt)
country: AT
icon: { default: 'at/schutzsignal-abfahrt' }
tags:
- { tag: 'railway:signal:minor', value: 'AT-V2:schutzsignal' }
- { tag: 'railway:signal:minor:form', value: 'light' }
- { tag: 'railway:signal:departure', value: 'AT-V2:abfahrt' }
- { tag: 'railway:signal:departure:form', value: 'light' }

- description: Schutzsignal (Signalnachahmer)
country: AT
icon: { default: 'at/schutzsignal-signalnachahmer' }
tags:
- { tag: 'railway:signal:minor', value: 'AT-V2:schutzsignal' }
- { tag: 'railway:signal:minor:form', value: 'light' }
- { tag: 'railway:signal:main_repeated', value: 'AT-V2:signalnachahmer' }
- { tag: 'railway:signal:main_repeated:form', value: 'light' }

- description: Schutzsignal
country: AT
icon: { default: 'at/schutzsignal' }
tags:
- { tag: 'railway:signal:minor', value: 'AT-V2:schutzsignal' }
- { tag: 'railway:signal:minor:form', value: 'light' }

- description: Überwachungssignal
country: AT
icon: { default: 'at/ek_gesichert' }
tags:
- { tag: 'railway:signal:crossing', value: 'AT-V2:ek_überwachungssignal' }
- { tag: 'railway:signal:crossing:form', value: 'light' }

- description: Pfeifpflock
country: AT
icon: { default: 'at/pfeifpflock' }
tags:
- { tag: 'railway:signal:whistle', value: 'AT-V2:pfeifpflock' }
- { tag: 'railway:signal:whistle:form', value: 'sign' }

- description: Gruppenpfeifpflock
country: AT
icon: { default: 'at/gruppenpfeifpflock' }
tags:
- { tag: 'railway:signal:whistle', value: 'AT-V2:gruppenpfeifpflock' }
- { tag: 'railway:signal:whistle:form', value: 'sign' }

- description: Endpflock
country: AT
icon: { default: 'at/endpflock' }
tags:
- { tag: 'railway:signal:whistle', value: 'AT-V2:endpflock' }
- { tag: 'railway:signal:whistle:form', value: 'sign' }

- description: Fahrwegende
country: AT
icon: { default: 'at/fahrwegende' }
tags:
- { tag: 'railway:signal:minor', value: 'AT-V2:fahrwegende' }
- { tag: 'railway:signal:minor:form', value: 'sign' }

- description: Haltepunkt
country: AT
icon: { default: 'at/haltepunkt' }
tags:
- { tag: 'railway:signal:stop', value: 'AT-V2:haltepunkt' }
- { tag: 'railway:signal:stop:form', value: 'sign' }

- description: Haltscheibe
country: AT
icon: { default: 'at/haltscheibe' }
tags:
- { tag: 'railway:signal:minor', value: 'AT-V2:haltscheibe' }
- { tag: 'railway:signal:minor:form', value: 'sign' }

- description: Abfahrt
country: AT
icon: { default: 'at/abfahrt' }
tags:
- { tag: 'railway:signal:departure', value: 'AT-V2:abfahrt' }
- { tag: 'railway:signal:departure:form', value: 'light' }

- description: Fahrerlaubnissignal
country: AT
icon: { default: 'at/fahrerlaubnis' }
tags:
- { tag: 'railway:signal:departure', value: 'AT-V2:fahrerlaubnissignal' }
- { tag: 'railway:signal:departure:form', value: 'light' }

- description: Signalnachahmer
country: AT
icon: { default: 'at/signalnachahmer' }
tags:
- { tag: 'railway:signal:main_repeated', value: 'AT-V2:signalnachahmer' }
- { tag: 'railway:signal:main_repeated:form', value: 'light' }

- description: LZB Bereichskennzeichen
country: AT
icon: { default: 'at/lzb-bereichskennzeichen' }
tags:
- { tag: 'railway:signal:train_protection', value: 'AT-V2:lzb-bereichskennzeichen' }
- { tag: 'railway:signal:train_protection:form', value: 'sign' }

# --- BE --- #

- description: grand signal d'arrêt
Expand Down
31 changes: 28 additions & 3 deletions import/docker-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,34 @@ $PSQL -f sql/signals_with_azimuth.sql
$PSQL -f sql/get_station_importance.sql
$PSQL -f sql/tile_views.sql

echo "Updating materialized views"
$PSQL -f sql/update_signals_with_azimuth.sql
$PSQL -f sql/update_station_importance.sql
case "$1" in
import)

echo "Skipping updating of materialized views"

;;

update)

# Fallthrough
;&

refresh)

echo "Updating materialized views"
$PSQL -f sql/update_signals_with_azimuth.sql
$PSQL -f sql/update_station_importance.sql

;;

*)

echo "Invalid argument '$1'. Supported: import, update, refresh"
exit 1

;;

esac

echo "Vacuuming database"
$PSQL -c "VACUUM FULL;"
Expand Down
10 changes: 9 additions & 1 deletion import/sql/signals_with_azimuth.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- Table with signals including their azimuth based on the direction of the signal and the railway line
CREATE MATERIALIZED VIEW IF NOT EXISTS signals_with_azimuth AS
-- and the functional signal feature
CREATE OR REPLACE VIEW signals_with_azimuth_view AS
-- TODO investigate signals with null features
SELECT
fs.*,
Expand Down Expand Up @@ -112,6 +113,13 @@ CREATE MATERIALIZED VIEW IF NOT EXISTS signals_with_azimuth AS
(railway IN ('signal', 'buffer_stop') AND signal_direction IS NOT NULL)
OR railway IN ('derail', 'vacancy_detection');

-- Use the view directly such that the query in the view can be updated
CREATE MATERIALIZED VIEW IF NOT EXISTS signals_with_azimuth AS
SELECT
*
FROM
signals_with_azimuth_view;

CREATE INDEX IF NOT EXISTS signals_with_azimuth_geom_index
ON signals_with_azimuth
USING GIST(way);
5 changes: 5 additions & 0 deletions symbols/at/abfahrt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions symbols/at/bedarfshalt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions symbols/at/ek_gesichert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions symbols/at/endpflock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions symbols/at/fahrerlaubnis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions symbols/at/fahrwegende.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions symbols/at/gruppenpfeifpflock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions symbols/at/haltepunkt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions symbols/at/haltscheibe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 56b98dd

Please sign in to comment.