Skip to content

Commit

Permalink
MOD/NFC: renamed function that had 'etcs' in the name
Browse files Browse the repository at this point in the history
  • Loading branch information
davide84 committed Oct 25, 2022
1 parent 3199ea0 commit 000a2ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions signals.mml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ Layer:
tags->'railway:kvb' AS kvb,
tags->'railway:tvm' AS tvm,
tags->'railway:scmt' AS scmt,
railway_etcs_null_no(tags->'railway:ptc') AS ptc,
railway_etcs_null_no(tags->'railway:etcs') AS etcs,
railway_etcs_null_no(tags->'construction:railway:etcs') AS construction_etcs
railway_null_or_zero_to_no(tags->'railway:ptc') AS ptc,
railway_null_or_zero_to_no(tags->'railway:etcs') AS etcs,
railway_null_or_zero_to_no(tags->'construction:railway:etcs') AS construction_etcs
FROM openrailwaymap_osm_line
WHERE railway = 'rail' AND usage IN ('main', 'branch') AND service IS NULL
) AS r
Expand Down Expand Up @@ -153,9 +153,9 @@ Layer:
tags->'railway:kvb' AS kvb,
tags->'railway:tvm' AS tvm,
tags->'railway:scmt' AS scmt,
railway_etcs_null_no(tags->'railway:ptc') AS ptc,
railway_etcs_null_no(tags->'railway:etcs') AS etcs,
railway_etcs_null_no(tags->'construction:railway:etcs') AS construction_etcs
railway_null_or_zero_to_no(tags->'railway:ptc') AS ptc,
railway_null_or_zero_to_no(tags->'railway:etcs') AS etcs,
railway_null_or_zero_to_no(tags->'construction:railway:etcs') AS construction_etcs
FROM openrailwaymap_osm_line
WHERE railway = 'rail' AND usage = 'main' AND service IS NULL
) AS r
Expand Down Expand Up @@ -201,9 +201,9 @@ Layer:
tags->'railway:kvb' AS kvb,
tags->'railway:tvm' AS tvm,
tags->'railway:scmt' AS scmt,
railway_etcs_null_no(tags->'railway:ptc') AS ptc,
railway_etcs_null_no(tags->'railway:etcs') AS etcs,
railway_etcs_null_no(tags->'construction:railway:etcs') AS construction_etcs,
railway_null_or_zero_to_no(tags->'railway:ptc') AS ptc,
railway_null_or_zero_to_no(tags->'railway:etcs') AS etcs,
railway_null_or_zero_to_no(tags->'construction:railway:etcs') AS construction_etcs,
layer
FROM openrailwaymap_osm_line
WHERE railway IN ('rail', 'tram', 'light_rail', 'subway', 'narrow_gauge', 'disused', 'construction', 'preserved')
Expand Down
2 changes: 1 addition & 1 deletion sql/functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ $$ LANGUAGE plpgsql;


-- Set a value to 'no' if it is null or 0.
CREATE OR REPLACE FUNCTION railway_etcs_null_no(field TEXT) RETURNS
CREATE OR REPLACE FUNCTION railway_null_or_zero_to_no(field TEXT) RETURNS
TEXT AS $$
BEGIN
IF field = '0' THEN
Expand Down

0 comments on commit 000a2ca

Please sign in to comment.