diff --git a/indexes.sql b/indexes.sql index af4886b38..2b6ac3fcb 100644 --- a/indexes.sql +++ b/indexes.sql @@ -3,7 +3,7 @@ CREATE INDEX planet_osm_line_ferry ON planet_osm_line USING GIST (way) WHERE route = 'ferry' AND osm_id > 0; CREATE INDEX planet_osm_line_label ON planet_osm_line USING GIST (way) WHERE name IS NOT NULL OR ref IS NOT NULL; CREATE INDEX planet_osm_line_river ON planet_osm_line USING GIST (way) WHERE waterway = 'river'; -CREATE INDEX planet_osm_line_waterway ON planet_osm_line USING GIST (way) WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch'); +CREATE INDEX planet_osm_line_waterway ON planet_osm_line USING GIST (way) 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; CREATE INDEX planet_osm_polygon_admin ON planet_osm_polygon USING GIST (ST_PointOnSurface(way)) WHERE name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4'); CREATE INDEX planet_osm_polygon_military ON planet_osm_polygon USING GIST (way) WHERE (landuse = 'military' OR military = 'danger_area') AND building IS NULL; diff --git a/indexes.yml b/indexes.yml index dd7179fe9..4a2c7b6f1 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 8fc2c8521..18f7be744 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 fdeef517d..c9fd0d631 100644 --- a/project.mml +++ b/project.mml @@ -204,7 +204,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 @@ -571,7 +571,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: @@ -899,7 +899,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 @@ -2175,7 +2175,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 5de2d7222..60ca27a01 100644 --- a/style/water.mss +++ b/style/water.mss @@ -52,6 +52,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], @@ -174,23 +176,27 @@ water/line-clip: false; } - [waterway = 'stream'][zoom >= 15] { + [waterway = 'stream'][zoom >= 15], + [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; - [waterway = 'stream'] { + [waterway = 'stream'], + [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,22 +241,10 @@ text-repeat-distance: @waterway-text-repeat-distance; } - [waterway = 'stream'][zoom >= 15] { - text-name: "[name]"; - text-size: 10; - text-face-name: @oblique-fonts; - text-fill: @water-text; - text-halo-radius: @standard-halo-radius; - text-halo-fill: @standard-halo-fill; - text-spacing: 600; - text-placement: line; - text-vertical-alignment: middle; - text-dy: 8; - text-repeat-distance: @waterway-text-repeat-distance; - } - [waterway = 'drain'], - [waterway = 'ditch'] { + [waterway = 'ditch'], + [waterway = 'stream'], + [waterway = 'fish_pass'] { [zoom >= 15] { text-name: "[name]"; text-size: 10;