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

wetland rendering differentiated by wetland type #1497

Merged
merged 4 commits into from
May 5, 2015
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions amenity-points.mss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@marina-text: #576ddf; // also swimming_pool
@wetland-text: darken(#017fff, 10%); /* Also for marsh */
@mud-text: darken(#aea397, 20%);
@wetland-text: darken(#4aa5fa, 25%); /* Also for marsh and mud */
@shop-icon: #ac39ac;
@money-icon: #555555;
@transportation-icon: #0092da;
Expand Down Expand Up @@ -962,26 +961,9 @@
text-placement: interior;
}

[feature = 'natural_mud'][is_building = 'no'] {
[zoom >= 10][way_pixels > 3000],
[zoom >= 17] {
text-name: "[name]";
text-size: @landcover-font-size;
[way_pixels > 12000] { text-size: @landcover-font-size-big; }
[way_pixels > 48000] { text-size: @landcover-font-size-bigger; }
text-fill: @mud-text;
text-face-name: @landcover-face-name;
text-halo-radius: 1;
text-halo-fill: rgba(255,255,255,0.6);
text-wrap-width: @landcover-wrap-width-size;
[way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; }
[way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; }
text-placement: interior;
}
}

[feature = 'natural_wetland'][is_building = 'no'],
[feature = 'natural_marsh'][is_building = 'no'] {
[feature = 'natural_marsh'][is_building = 'no'],
[feature = 'natural_mud'][is_building = 'no'] {
[zoom >= 10][way_pixels > 3000],
[zoom >= 17] {
text-name: "[name]";
Expand Down
41 changes: 41 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@vineyard: #b3e2a8;
@grassland: #c6e4b4;
@scrub: #b5e3b5;
@mangrove: rgba(151,199,136,0.75); // produces @wood over @land

// --- sports ---

Expand Down Expand Up @@ -45,6 +46,7 @@
@danger_area: pink;
@garages: #dfddce;
@heath: #d6d99f;
@mud: rgba(203,177,154,0.3); // produces #e6dcd1 over @land
@parking: #f7efb7;
@place_of_worship: #cdccc9;
@place_of_worship_outline: #111;
Expand Down Expand Up @@ -442,6 +444,45 @@
}
}

[feature = 'wetland_mud'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be natural_mud?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in https://github.com/imagico/openstreetmap-carto/blob/wetland-improvements/project.yaml#L151 mud and marsh are translated to wetland types so natural=marsh/mud and natural=wetland+wetland=marsh/mud are treated exactly the same. This could of course also be done in the style sheet but this seems more consistent in result, esp. with regard to priorities in COALESCE() - otherwise a polygon tagged natural=marsh + landuse=* would be rendered different to one tagged natural=wetland + wetland=marsh + landuse=*.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I see now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see.

[feature = 'wetland_tidalflat'] {
[zoom >= 9] {
polygon-fill: @mud;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
}

[feature = 'wetland_swamp'][zoom >= 8] {
polygon-fill: @wood;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'wetland_mangrove'][zoom >= 8] {
polygon-fill: @mangrove;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'wetland_bog'],
[feature = 'wetland_string_bog'] {
[zoom >= 10] {
polygon-fill: @heath;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
}

[feature = 'wetland_wet_meadow'],
[feature = 'wetland_marsh'] {
[zoom >= 10] {
polygon-fill: @grass;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
}

[feature = 'amenity_university'],
[feature = 'amenity_college'],
[feature = 'amenity_school'],
Expand Down
8 changes: 4 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,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\n way, name, way_pixels,\n COALESCE(landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest')\n OR \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock'))\n AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n ) AS features\n) AS landcover_low_zoom",
"table": "(SELECT\n way, name, way_pixels,\n COALESCE(wetland, landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'mud') THEN (CASE WHEN \"natural\" IN ('mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest')\n OR \"natural\" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))\n AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n ) AS features\n) AS landcover_low_zoom",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand All @@ -126,7 +126,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\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, landuse, leisure, military, \"natural\", power, tourism, highway, railway) AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01\n ORDER BY z_order, way_area DESC\n ) AS landcover\n) AS features",
"table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, wetland, landuse, leisure, military, \"natural\", power, tourism, highway, railway) AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('wetland_' || (CASE WHEN \"natural\" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN \"natural\" IN ('marsh', 'mud') THEN \"natural\" ELSE wetland END) ELSE NULL END)) AS wetland,\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01\n ORDER BY z_order, way_area DESC\n ) AS landcover\n) AS features",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down Expand Up @@ -231,7 +231,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\n way, \"natural\", waterway, landuse, name, way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE\n (waterway IN ('dock', 'riverbank', 'canal')\n OR landuse IN ('reservoir', 'basin')\n OR \"natural\" IN ('water', 'glacier', 'mud'))\n AND building IS NULL\n AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01\n ORDER BY z_order, way_area DESC\n) AS water_areas",
"table": "(SELECT\n way, \"natural\", waterway, landuse, name, way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n WHERE\n (waterway IN ('dock', 'riverbank', 'canal')\n OR landuse IN ('reservoir', 'basin')\n OR \"natural\" IN ('water', 'glacier'))\n AND building IS NULL\n AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01\n ORDER BY z_order, way_area DESC\n) AS water_areas",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand All @@ -257,7 +257,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\n way, \"natural\"\n FROM planet_osm_polygon\n WHERE \"natural\" IN ('marsh', 'wetland')\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n) AS water_areas_overlay",
"table": "(SELECT\n way,\n CASE WHEN \"natural\" IN ('marsh', 'mud') THEN \"natural\" ELSE wetland END AS int_wetland\n FROM planet_osm_polygon\n WHERE \"natural\" IN ('marsh', 'mud', 'wetland')\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n) AS water_areas_overlay",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
17 changes: 10 additions & 7 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,16 @@ Layer:
table: |-
(SELECT
way, name, way_pixels,
COALESCE(landuse, "natural") AS feature
COALESCE(wetland, landuse, "natural") AS feature
FROM (SELECT
way, COALESCE(name, '') AS name,
('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,
('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END)) AS "natural",
('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland,
way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
FROM planet_osm_polygon
WHERE (landuse IN ('forest')
OR "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock'))
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))
AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01
AND building IS NULL
ORDER BY z_order, way_area DESC
Expand All @@ -138,7 +139,7 @@ Layer:
table: |-
(SELECT
way, name, religion, way_pixels,
COALESCE(aeroway, amenity, landuse, leisure, military, "natural", power, tourism, highway, railway) AS feature
COALESCE(aeroway, amenity, wetland, landuse, leisure, military, "natural", power, tourism, highway, railway) AS feature
FROM (SELECT
way, COALESCE(name, '') AS name,
('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,
Expand All @@ -147,6 +148,7 @@ Layer:
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,
('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,
('natural_' || (CASE WHEN "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural",
('wetland_' || (CASE WHEN "natural" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland,
('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,
('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') THEN tourism ELSE NULL END)) AS tourism,
('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,
Expand All @@ -159,7 +161,7 @@ Layer:
OR aeroway IN ('apron', 'aerodrome')
OR amenity IN ('parking', 'bicycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison')
OR military IN ('danger_area')
OR "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')
OR "natural" IN ('beach', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')
OR power IN ('station', 'sub_station', 'substation', 'generator')
OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo')
OR highway IN ('services', 'rest_area')
Expand Down Expand Up @@ -234,7 +236,7 @@ Layer:
WHERE
(waterway IN ('dock', 'riverbank', 'canal')
OR landuse IN ('reservoir', 'basin')
OR "natural" IN ('water', 'glacier', 'mud'))
OR "natural" IN ('water', 'glacier'))
AND building IS NULL
AND way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) > 0.01
ORDER BY z_order, way_area DESC
Expand All @@ -251,9 +253,10 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way, "natural"
way,
CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE wetland END AS int_wetland
FROM planet_osm_polygon
WHERE "natural" IN ('marsh', 'wetland')
WHERE "natural" IN ('marsh', 'mud', 'wetland')
AND building IS NULL
ORDER BY z_order, way_area DESC
) AS water_areas_overlay
Expand Down
Binary file modified symbols/wetland.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/wetland_bog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/wetland_mangrove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/wetland_marsh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/wetland_reed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added symbols/wetland_swamp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 28 additions & 11 deletions water.mss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@water-text: #6699cc;
@glacier: #ddecec;
@glacier-line: #9cf;
@mud: #e6dcd1;

#water-areas {
[natural = 'glacier']::natural {
Expand Down Expand Up @@ -52,19 +51,37 @@
}
}
}

[natural = 'mud'][zoom >= 10]::natural {
polygon-fill: @mud;
polygon-pattern-file: url('symbols/mud.png');
polygon-pattern-alignment: global;
}
}

#water-areas-overlay {
[natural = 'marsh'],
[natural = 'wetland'] {
[zoom >= 10] {
polygon-pattern-file: url('symbols/wetland.png');
[zoom >= 10] {
polygon-pattern-file: url('symbols/wetland.png');
polygon-pattern-alignment: global;
}
[zoom >= 14] {
[int_wetland = 'marsh'],
[int_wetland = 'saltmarsh'],
[int_wetland = 'wet_meadow'],
[int_wetland = 'fen'] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would drop wetland=fen. It is undocumented and has only 65 instances.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be fine with me - i included it since it is on http://wiki.openstreetmap.org/wiki/Key:wetland.

polygon-pattern-file: url('symbols/wetland_marsh.png');
polygon-pattern-alignment: global;
}
[int_wetland = 'reedbed'] {
polygon-pattern-file: url('symbols/wetland_reed.png');
polygon-pattern-alignment: global;
}
[int_wetland = 'mangrove'] {
polygon-pattern-file: url('symbols/wetland_mangrove.png');
polygon-pattern-alignment: global;
}
[int_wetland = 'swamp'] {
polygon-pattern-file: url('symbols/wetland_swamp.png');
polygon-pattern-alignment: global;
}
[int_wetland = 'bog'],
[int_wetland = 'string_bog'] {
polygon-pattern-file: url('symbols/wetland_bog.png');
polygon-pattern-alignment: global;
}
}
}
Expand Down