From f431bcc1e3d4ba52b23b8bf023949aad3ebad701 Mon Sep 17 00:00:00 2001 From: math1985 Date: Sun, 12 Oct 2014 12:24:49 +0100 Subject: [PATCH] Drop rendering military=barracks We have landuse=military for the area already, and the buildings themselves are just as well rendered as regular builidings. --- amenity-points.mss | 18 ------------------ landcover.mss | 7 ------- project.mml | 2 +- project.yaml | 4 ++-- 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index f400a21785..5a421600eb 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1458,24 +1458,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] { diff --git a/landcover.mss b/landcover.mss index bf578af324..4ff832ca9b 100644 --- a/landcover.mss +++ b/landcover.mss @@ -38,7 +38,6 @@ @allotments: #e5c7ab; @apron: #e9d1ff; @attraction: #f2caea; -@barracks: #ff8f8f; @campsite: #def6c0; // also caravan_site, picnic_site @cemetery: #aacbaf; // also grave_yard @construction: #b6b592; @@ -165,12 +164,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; diff --git a/project.mml b/project.mml index b808517027..a0cf4388f5 100644 --- a/project.mml +++ b/project.mml @@ -85,7 +85,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) 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') 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 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')\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 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) 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') 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 ('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 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')\n OR military IN ('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 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": "", diff --git a/project.yaml b/project.yaml index 4ea6006c7c..6db4a7ff8c 100644 --- a/project.yaml +++ b/project.yaml @@ -109,7 +109,7 @@ Layer: ('amenity_' || (CASE WHEN amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard') 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, ('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, + ('military_' || (CASE WHEN military IN ('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", ('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, @@ -121,7 +121,7 @@ Layer: OR leisure IS NOT NULL OR aeroway IN ('apron', 'aerodrome') OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard') - OR military IN ('barracks', 'danger_area') + OR military IN ('danger_area') OR "natural" IN ('beach', 'desert', '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')