Skip to content

Commit

Permalink
Change boundary nature reserve / national park areas
Browse files Browse the repository at this point in the history
This changes the rendering of national parks in the following way:
* Render border with a double uninterrupted line (line marinas).
* Require 100px minimum size for rendering.
* For zoom levels 10-12, drop transparent fill.

* Resolves gravitystorm#69
* Resolves gravitystorm#563
* Supersedes gravitystorm#1077

Changes with respect to gravitystorm#1077:
* Restore transparent fill for zoomlevels 7-9.
* Make line slightly narrower on zoomlevels 10-12 and wider on zoomlevel 10-13.
  • Loading branch information
matthijsmelissen committed Dec 8, 2014
1 parent 5c630b3 commit df28261
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 16 deletions.
41 changes: 27 additions & 14 deletions admin.mss
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,34 @@ overlapping borders correctly. */
}

#nature-reserve-boundaries {
[zoom >= 7] {
::fill [zoom < 13] {
opacity: 0.05;
polygon-fill: green;
}
::line {
opacity: 0.15;
line-color: green;
line-width: 1.5;
line-dasharray: 4,2;
[zoom >= 10] {
line-width: 3;
line-dasharray: 6,2;
line-join: bevel;
[way_pixels > 100][zoom >= 7] {
[zoom < 10] {
::fill {
opacity: 0.05;
polygon-fill: green;
}
}
a/line-width: 1;
a/line-offset: -0.5;
a/line-color: green;
a/line-opacity: 0.15;
a/line-join: round;
a/line-cap: round;
b/line-width: 2;
b/line-offset: -1;
b/line-color: green;
b/line-opacity: 0.15;
b/line-join: round;
b/line-cap: round;
[zoom >= 10] {
a/line-width: 2;
a/line-offset: -1;
b/line-width: 4;
b/line-offset: -2;
}
[zoom >= 14] {
b/line-width: 6;
b/line-offset: -3;
}
}
}
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT way, way_area, name, boundary FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries",
"table": "(SELECT way, way_area, name, boundary, way_area/(!pixel_width!*!pixel_height!) AS way_pixels FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ Layer:
Datasource:
<<: *osm2pgsql
table: |2-
(SELECT way, way_area, name, boundary FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries
(SELECT way, way_area, name, boundary, way_area/(!pixel_width!*!pixel_height!) AS way_pixels FROM planet_osm_polygon WHERE (boundary = 'national_park' OR leisure = 'nature_reserve') AND building IS NULL) AS national_park_boundaries
advanced: {}
- id: "theme-park"
name: "theme-park"
Expand Down

0 comments on commit df28261

Please sign in to comment.