Skip to content

Commit

Permalink
water: render waterway=fish_pass
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJJ committed Apr 26, 2021
1 parent a2077c0 commit 5f1e3c1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion indexes.sql
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion indexes.yml
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion openstreetmap-carto.lua
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions project.mml
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
19 changes: 18 additions & 1 deletion style/water.mss
Expand Up @@ -37,6 +37,7 @@

#water-lines-casing {
[waterway = 'stream'],
[waterway = 'fish_pass'],
[waterway = 'ditch'],
[waterway = 'drain'] {
[int_tunnel = 'no'] {
Expand Down Expand Up @@ -144,6 +145,7 @@
}

[waterway = 'stream'],
[waterway = 'fish_pass'],
[waterway = 'ditch'],
[waterway = 'drain'] {
[int_intermittent != 'yes'][zoom >= 14],
Expand Down Expand Up @@ -181,16 +183,30 @@
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;
[waterway = 'stream'] {
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;
}
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5f1e3c1

Please sign in to comment.