Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rendering for man_made=pipeline ways #4070

Merged
merged 10 commits into from
Mar 27, 2020
12 changes: 12 additions & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,21 @@ Layer:
(SELECT
way,
aerialway,
man_made,
tags->'substance' AS substance,
name
FROM planet_osm_line
WHERE aerialway IS NOT NULL
OR (man_made = 'pipeline'
AND tags-> 'location' IN ('overground', 'overhead', 'surface', 'outdoor')
OR bridge IN ('yes', 'aqueduct', 'cantilever', 'covered', 'trestle', 'viaduct'))
ORDER BY
CASE
WHEN man_made = 'pipeline' THEN 1
WHEN tags-> 'location' = 'overhead' THEN 2
WHEN bridge IS NOT NULL THEN 3
WHEN aerialway IS NOT NULL THEN 4
END
) AS aerialways
properties:
minzoom: 12
Expand Down
78 changes: 75 additions & 3 deletions style/aerialways.mss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
text-spacing: 900;
text-clip: false;
text-placement: line;
text-min-distance: 18;
text-repeat-distance: 200;
text-margin: 18;
text-face-name: @book-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
Expand Down Expand Up @@ -54,7 +55,8 @@
text-spacing: 900;
text-clip: false;
text-placement: line;
text-min-distance: 18;
text-repeat-distance: 200;
text-margin: 18;
text-face-name: @book-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
Expand Down Expand Up @@ -92,7 +94,8 @@
text-spacing: 900;
text-clip: false;
text-placement: line;
text-min-distance: 18;
text-repeat-distance: 200;
text-margin: 18;
text-face-name: @book-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
Expand All @@ -103,4 +106,73 @@
}
}
}

[man_made = 'pipeline'] {
[zoom >= 14] {
line/line-width: .7;
line/line-join: round;
line/line-color: #909090;
line/line-dasharray: 0,.7,14,.7;
dash/line-width: 2;
dash/line-join: round;
dash/line-color: #909090;
dash/line-dasharray: 0,.7,.7,12.6,.7,.7;
[zoom >= 15] {
line/line-width: 1;
line/line-dasharray: 0,.7,16,.7;
dash/line-width: 2.5;
dash/line-dasharray: 0,.7,.7,14.6,.7,.7;
}
[zoom >= 16] {
line/line-width: 1.5;
line/line-dasharray: 0,1,20,1;
dash/line-width: 3;
dash/line-dasharray: 0,1,1,18,1,1;
}
[zoom >= 17] {
line/line-width: 2;
line/line-dasharray: 0,1,24,1;
dash/line-width: 4;
dash/line-dasharray: 0,1,1,22,1,1;
center/line-width: 1;
center/line-dasharray: 0,2,22,2;
center/line-color: @land-color;
center/line-join: round;
[substance = 'water'] { center/line-color: @water-color; }
[substance = 'gas'] { center/line-color: #c1c1c1; } // Lch(78,0,0)
[substance = 'oil'] { center/line-color: #cfbfa5; } // Lch(78,15,83)
text-name: "[name]";
text-fill: #666666;
text-size: 10;
text-dy: 6;
text-spacing: 900;
text-clip: false;
text-placement: line;
text-repeat-distance: 200;
text-margin: 18;
text-face-name: @book-fonts;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
}
[zoom >= 18] {
text-dy: 7;
line/line-width: 3;
line/line-dasharray: 0,1,30,1;
dash/line-width: 5;
dash/line-dasharray: 0,1,1,28,1,1;
center/line-width: 2;
center/line-dasharray: 0,2,28,2;
}
[zoom >= 19] {
text-size: 11;
text-dy: 8;
line/line-width: 4;
line/line-dasharray: 0,1,36,1;
dash/line-width: 6;
dash/line-dasharray: 0,1,1,34,1,1;
center/line-width: 3;
center/line-dasharray: 0,2,34,2;
}
}
}
}