Skip to content

Commit

Permalink
Merge pull request #1200 from math1985/drop-barracks-desert-field
Browse files Browse the repository at this point in the history
Drop rendering for landuse=field, military=barracks, and natural=desert
  • Loading branch information
mkoniecz committed Jan 6, 2015
2 parents 3f2d6bc + 5a63887 commit a67327d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 88 deletions.
54 changes: 0 additions & 54 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1024,24 +1024,6 @@
}
}

[feature = 'landuse_field'][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: darken(@field, 50%);
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 = 'landuse_meadow'][is_building = 'no'],
[feature = 'landuse_grass'][is_building = 'no'] {
[zoom >= 10][way_pixels > 3000],
Expand Down Expand Up @@ -1618,24 +1600,6 @@
text-placement: interior;
}

[feature = 'military_barracks'][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: darken(@barracks, 40%);
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 = 'tourism_zoo'][is_building = 'no'] {
[zoom >= 10][way_pixels > 3000],
[zoom >= 17] {
Expand Down Expand Up @@ -1675,24 +1639,6 @@
}
}

[feature = 'natural_desert'][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: darken(@desert, 40%);
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_sand'][is_building = 'no'] {
[zoom >= 10][way_pixels > 3000],
[zoom >= 17] {
Expand Down
28 changes: 0 additions & 28 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@
@aerodrome: #e9e7e2;
@allotments: #e5c7ab;
@apron: #e9d1ff;
@barracks: #ff8f8f;
@campsite: #def6c0; // also caravan_site, picnic_site
@cemetery: #aacbaf; // also grave_yard
@construction: #b6b592;
@danger_area: pink;
@desert: #e3b57a;
@field: @farmland;
@garages: #dfddce;
@heath: #d6d99f;
@parking: #f7efb7;
Expand Down Expand Up @@ -172,25 +169,6 @@
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'military_barracks'][zoom >= 10] {
polygon-fill: @barracks;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'landuse_field'] {
[zoom >= 10] {
polygon-fill: @field;
[zoom >= 14] {
line-width: 0.3;
line-opacity: 0.4;
line-color: saturate(darken(@field, 40%), 20%);
}
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
}

[feature = 'military_danger_area'] {
[zoom >= 9][zoom < 11] {
polygon-fill: @danger_area;
Expand Down Expand Up @@ -397,12 +375,6 @@
}
}

[feature = 'natural_desert'][zoom >= 10] {
polygon-fill: @desert;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'natural_sand'][zoom >= 10] {
polygon-fill: @sand;
[way_pixels >= 4] { polygon-gamma: 0.75; }
Expand Down
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,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', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'field', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', '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', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('barracks', 'danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'desert', 'heath', 'mud', 'grassland', 'wood', 'sand', '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/(!pixel_width!*!pixel_height!) 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', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship')\n OR military IN ('barracks', 'danger_area')\n OR \"natural\" IN ('beach', 'desert', 'heath', 'mud', 'grassland', 'wood', 'sand', '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/(!pixel_width!*!pixel_height!) > 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, 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', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', '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', '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', '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', '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/(!pixel_width!*!pixel_height!) 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', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', '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/(!pixel_width!*!pixel_height!) > 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
10 changes: 5 additions & 5 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ Layer:
way, COALESCE(name, '') AS name,
('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,
('amenity_' || (CASE WHEN amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship') THEN amenity ELSE NULL END)) AS amenity,
('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'field', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,
('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,
('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,
('military_' || (CASE WHEN military IN ('barracks', 'danger_area') THEN military ELSE NULL END)) AS military,
('natural_' || (CASE WHEN "natural" IN ('beach', 'desert', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub') THEN "natural" ELSE NULL END)) AS "natural",
('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', 'scrub') THEN "natural" ELSE NULL END)) AS "natural",
('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 @@ -146,8 +146,8 @@ Layer:
OR leisure IS NOT NULL
OR aeroway IN ('apron', 'aerodrome')
OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship')
OR military IN ('barracks', 'danger_area')
OR "natural" IN ('beach', 'desert', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub')
OR military IN ('danger_area')
OR "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', '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

0 comments on commit a67327d

Please sign in to comment.