From aa8d079d9531408a9ec96c4deb39e347c87c2dbc Mon Sep 17 00:00:00 2001 From: polarbearing Date: Sun, 27 Jul 2014 16:37:44 +0200 Subject: [PATCH 1/2] prison area with grey hatching --- landcover.mss | 8 ++++++++ project.mml | 2 +- project.yaml | 4 ++-- symbols/grey_vertical_hatch.png | Bin 0 -> 95 bytes 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 symbols/grey_vertical_hatch.png diff --git a/landcover.mss b/landcover.mss index 37a33b9259..afbb86f63c 100644 --- a/landcover.mss +++ b/landcover.mss @@ -113,6 +113,14 @@ } } + [feature = 'amenity_prison'][zoom >= 10] { + polygon-pattern-file: url('symbols/grey_vertical_hatch.png'); + polygon-pattern-alignment: global; + line-color: #888; + line-width: 3; + line-opacity: 0.329; + } + [feature = 'landuse_residential'][zoom >= 10] { polygon-fill: @residential; [zoom >= 16] { diff --git a/project.mml b/project.mml index ca63f393e0..ec4fa9749e 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,\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 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 ORDER BY z_order, way_area DESC\n ) AS landcover\n) AS features", + "table": "(SELECT \n way, name, religion,\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', 'prison') 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 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', 'prison')\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 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 e221d82ed6..59d4aab978 100644 --- a/project.yaml +++ b/project.yaml @@ -106,7 +106,7 @@ Layer: FROM (SELECT 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') THEN amenity ELSE NULL END)) AS amenity, + ('amenity_' || (CASE WHEN amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'prison') 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, @@ -119,7 +119,7 @@ Layer: WHERE landuse IS NOT NULL OR leisure IS NOT NULL OR aeroway IN ('apron', 'aerodrome') - OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard') + OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'prison') OR military IN ('barracks', 'danger_area') OR "natural" IN ('beach', 'desert', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub') OR power IN ('station', 'sub_station', 'substation', 'generator') diff --git a/symbols/grey_vertical_hatch.png b/symbols/grey_vertical_hatch.png new file mode 100644 index 0000000000000000000000000000000000000000..460c5655aca4fce32d09e90eb54973fba1d03b85 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`YMw5RAr*6yUc7!C>~{F3heRwN qvvH4ixt literal 0 HcmV?d00001 From 94546027f3c7eb5043e4d2c8f2895b165411fc13 Mon Sep 17 00:00:00 2001 From: polarbearing Date: Sun, 27 Jul 2014 16:37:44 +0200 Subject: [PATCH 2/2] prison area with grey hatching