From ac4568d52dabc86a736d42500e55a89d0b314a4e Mon Sep 17 00:00:00 2001 From: math1985 Date: Mon, 20 Nov 2017 16:25:31 +0100 Subject: [PATCH] Render maritime admin boundaries less prominently This requires rendering admin boundaries based on the individual lines, rather than the entire polygons. * This fixes #621 * This possibly impacts solutions to #723, #2234m and #2663. --- admin.mss | 22 ++++++++++++++++++++++ project.mml | 15 +++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/admin.mss b/admin.mss index 750c33df14..b0e674c09f 100644 --- a/admin.mss +++ b/admin.mss @@ -1,4 +1,5 @@ @admin-boundaries: #ac46ac; +@admin-boundaries-maritime: darken(@water-color,15%); @admin-simplify: 4; @admin-simplify-algorithm: visvalingam-whyatt; @@ -21,6 +22,9 @@ overlapping borders correctly. background/line-simplify-algorithm: @admin-simplify-algorithm; line-join: bevel; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-width: 1.2; line-simplify: @admin-simplify; line-simplify-algorithm: @admin-simplify-algorithm; @@ -52,6 +56,9 @@ overlapping borders correctly. background/line-simplify-algorithm: @admin-simplify-algorithm; line-join: bevel; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-width: 0.6; line-simplify: @admin-simplify; line-simplify-algorithm: @admin-simplify-algorithm; @@ -76,6 +83,9 @@ overlapping borders correctly. background/line-simplify: @admin-simplify; background/line-simplify-algorithm: @admin-simplify-algorithm; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-join: bevel; line-width: 0.4; line-simplify: @admin-simplify; @@ -133,6 +143,9 @@ overlapping borders correctly. background/line-simplify-algorithm: @admin-simplify-algorithm; line-join: bevel; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-width: 2; line-simplify: @admin-simplify; line-simplify-algorithm: @admin-simplify-algorithm; @@ -147,6 +160,9 @@ overlapping borders correctly. background/line-simplify-algorithm: @admin-simplify-algorithm; line-join: bevel; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-width: 2; line-simplify: @admin-simplify; line-simplify-algorithm: @admin-simplify-algorithm; @@ -163,6 +179,9 @@ overlapping borders correctly. background/line-simplify-algorithm: @admin-simplify-algorithm; line-join: bevel; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-width: 1.5; line-simplify: @admin-simplify; line-simplify-algorithm: @admin-simplify-algorithm; @@ -185,6 +204,9 @@ overlapping borders correctly. background/line-simplify-algorithm: @admin-simplify-algorithm; line-join: bevel; line-color: @admin-boundaries; + [maritime = 'yes'] { + line-color: @admin-boundaries-maritime; + } line-width: 2; line-simplify: @admin-simplify; line-simplify-algorithm: @admin-simplify-algorithm; diff --git a/project.mml b/project.mml index 37894bee80..9b371a8438 100644 --- a/project.mml +++ b/project.mml @@ -1134,11 +1134,12 @@ Layer: table: |- (SELECT way, - admin_level + admin_level, + tags->'maritime' as maritime FROM planet_osm_roads WHERE boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4') - AND osm_id < 0 + AND osm_id > 0 ORDER BY admin_level DESC ) AS admin_low_zoom properties: @@ -1152,11 +1153,12 @@ Layer: table: |- (SELECT way, - admin_level + admin_level, + boundary FROM planet_osm_roads WHERE boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8') - AND osm_id < 0 + AND osm_id > 0 ORDER BY admin_level DESC ) AS admin_mid_zoom properties: @@ -1170,11 +1172,12 @@ Layer: table: |- (SELECT way, - admin_level + admin_level, + boundary FROM planet_osm_roads WHERE boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10') - AND osm_id < 0 + AND osm_id > 0 ORDER BY admin_level::integer DESC -- With 10 as a valid value, we need to do a numeric ordering, not a text ordering ) AS admin_high_zoom properties: