From 5f1e3c1bc4b015903dd759b6006c55ac493100c7 Mon Sep 17 00:00:00 2001 From: Jonas Jelten Date: Sun, 25 Apr 2021 19:04:19 +0200 Subject: [PATCH] water: render waterway=fish_pass --- indexes.sql | 2 +- indexes.yml | 2 +- openstreetmap-carto.lua | 2 +- project.mml | 10 +++++----- style/water.mss | 19 ++++++++++++++++++- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/indexes.sql b/indexes.sql index 6c1990d3e4..6c15d74010 100644 --- a/indexes.sql +++ b/indexes.sql @@ -12,7 +12,7 @@ CREATE INDEX planet_osm_line_river WHERE waterway = 'river'; CREATE INDEX planet_osm_line_waterway ON planet_osm_line USING GIST (way) - WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch'); + WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'fish_pass'); CREATE INDEX planet_osm_point_place ON planet_osm_point USING GIST (way) WHERE place IS NOT NULL AND name IS NOT NULL; diff --git a/indexes.yml b/indexes.yml index d13e1287f0..709acbdb1c 100644 --- a/indexes.yml +++ b/indexes.yml @@ -14,7 +14,7 @@ line: river: where: waterway = 'river' waterway: - where: waterway IN ('river', 'canal', 'stream', 'drain', 'ditch') + where: waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'fish_pass') polygon: # The polygon table is by far the largest, and generally the slowest name: diff --git a/openstreetmap-carto.lua b/openstreetmap-carto.lua index 8dbca62a64..3dee0d2cca 100644 --- a/openstreetmap-carto.lua +++ b/openstreetmap-carto.lua @@ -47,7 +47,7 @@ local linestring_values = { natural = {cliff = true, earth_bank = true, tree_row = true, ridge = true, arete = true}, power = {cable = true, line = true, minor_line = true}, tourism = {yes = true}, - waterway = {canal = true, derelict_canal = true, ditch = true, drain = true, river = true, stream = true, tidal_channel = true, wadi = true, weir = true} + waterway = {canal = true, derelict_canal = true, ditch = true, drain = true, river = true, stream = true, fish_pass = true, tidal_channel = true, wadi = true, weir = true} } -- Objects with any of the following key/value combinations will be treated as polygon diff --git a/project.mml b/project.mml index 22869c1979..045e1bdc76 100644 --- a/project.mml +++ b/project.mml @@ -177,7 +177,7 @@ Layer: OR waterway='canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel FROM planet_osm_line - WHERE waterway IN ('stream', 'drain', 'ditch') + WHERE waterway IN ('stream', 'drain', 'ditch', 'fish_pass') ) AS water_lines_casing properties: minzoom: 13 @@ -217,7 +217,7 @@ Layer: THEN 'yes' ELSE 'no' END AS int_tunnel, 'no' AS bridge FROM planet_osm_line - WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch') + WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'fish_pass') AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')) ORDER BY COALESCE(layer,0) ) AS water_lines @@ -588,7 +588,7 @@ Layer: WHERE barrier IN ('chain', 'city_wall', 'ditch', 'fence', 'guard_rail', 'handrail', 'hedge', 'retaining_wall', 'wall') OR historic = 'citywalls' - AND (waterway IS NULL OR waterway NOT IN ('river', 'canal', 'stream', 'drain', 'ditch')) + AND (waterway IS NULL OR waterway NOT IN ('river', 'canal', 'stream', 'drain', 'ditch', 'fish_pass')) ) AS features ) AS line_barriers properties: @@ -904,7 +904,7 @@ Layer: THEN 'yes' ELSE 'no' END AS int_tunnel, 'yes' AS bridge FROM planet_osm_line - WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch') + WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'fish_pass') AND bridge IN ('yes', 'aqueduct') ORDER BY COALESCE(layer,0) ) AS waterway_bridges @@ -2124,7 +2124,7 @@ Layer: OR waterway = 'canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel FROM planet_osm_line - WHERE (waterway IN ('river', 'canal', 'stream', 'drain', 'ditch') + WHERE (waterway IN ('river', 'canal', 'stream', 'drain', 'ditch', 'fish_pass') OR "natural" IN ('bay', 'strait')) AND (tunnel IS NULL OR tunnel != 'culvert') AND name IS NOT NULL diff --git a/style/water.mss b/style/water.mss index 84829eda3d..6c9000c007 100644 --- a/style/water.mss +++ b/style/water.mss @@ -37,6 +37,7 @@ #water-lines-casing { [waterway = 'stream'], + [waterway = 'fish_pass'], [waterway = 'ditch'], [waterway = 'drain'] { [int_tunnel = 'no'] { @@ -144,6 +145,7 @@ } [waterway = 'stream'], + [waterway = 'fish_pass'], [waterway = 'ditch'], [waterway = 'drain'] { [int_intermittent != 'yes'][zoom >= 14], @@ -181,6 +183,15 @@ background/line-width: 3; } } + + [waterway = 'fish_pass'][zoom >= 15] { + water/line-width: 3; + + [int_tunnel = 'yes'] { + background/line-width: 3; + } + } + [int_tunnel = 'yes'][zoom >= 15] { background/line-width: 3.5; water/line-width: 3.5; @@ -188,9 +199,14 @@ background/line-width: 4.5; water/line-width: 4.5; } + [waterway = 'fish_pass'] { + background/line-width: 4.5; + water/line-width: 4.5; + } water/line-dasharray: 4,2; tunnelfill/line-width: 1; [waterway = 'stream'] { tunnelfill/line-width: 2; } + [waterway = 'fish_pass'] { tunnelfill/line-width: 2; } tunnelfill/line-color: #f3f7f7; } } @@ -235,7 +251,8 @@ text-repeat-distance: @waterway-text-repeat-distance; } - [waterway = 'stream'][zoom >= 15] { + [waterway = 'stream'][zoom >= 15], + [waterway = 'fish_pass'][zoom >= 15] { text-name: "[name]"; text-size: 10; text-face-name: @oblique-fonts;