From 5666bf27d3f9967f86ea9e9c12a1d8d29292c180 Mon Sep 17 00:00:00 2001 From: Ircama Date: Sat, 20 Aug 2016 16:02:33 +0200 Subject: [PATCH] Better rendering of religious features This branch supersedes branch https://github.com/Ircama/openstreetmap-carto/tree/topo-extension-zooms specifically for the rendering of religious buildings and related text: amenity=place_of_worship man_made=campanile building=shrine building=synagogue building=temple building=mosque building=church building=chapel building=cathedral Related PR will replace #2139 for the rendering of religious features. --- amenity-points.mss | 27 +++++++++++++++++++++++++-- buildings.mss | 9 ++++++++- landcover.mss | 8 ++++++++ project.mml | 12 ++++++------ project.yaml | 35 ++++++++++++++++++++++++----------- 5 files changed, 71 insertions(+), 20 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index e6e17cc1a4..b6e6d18ece 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -375,23 +375,39 @@ marker-clip: false; } + [feature = 'man_made_campanile'][zoom >= 16], + [feature = 'building_shrine'][zoom >= 16], + [feature = 'building_synagogue'][zoom >= 16], + [feature = 'building_temple'][zoom >= 16], + [feature = 'building_mosque'][zoom >= 16], + [feature = 'building_church'][zoom >= 16], + [feature = 'building_chapel'][zoom >= 16], + [feature = 'building_cathedral'][zoom >= 16], [feature = 'amenity_place_of_worship'][zoom >= 16] { marker-file: url('symbols/place_of_worship.16.svg'); + [feature = 'man_made_campanile'] { + marker-file: url('symbols/christian.9.svg'); + } marker-fill: #000000; marker-placement: interior; marker-clip: false; + [feature = 'building_chapel'], + [feature = 'building_church'], + [feature = 'building_cathedral'], [religion = 'christian'] { marker-file: url('symbols/christian.16.svg'); [denomination = 'jehovahs_witness']{ marker-file: url('symbols/place_of_worship.16.svg'); } } + [feature = 'building_mosque'], [religion = 'muslim'] { marker-file: url('symbols/muslim.16.svg'); } [religion = 'sikh'] { marker-file: url('symbols/sikhist.16.svg'); } + [feature = 'building_synagogue'], [religion = 'jewish'] { marker-file: url('symbols/jewish.16.svg'); } @@ -1275,7 +1291,15 @@ text-placement: interior; } - [feature = 'amenity_place_of_worship'][zoom >= 17] { + [feature = 'man_made_campanile'][zoom >= 16], + [feature = 'building_shrine'][zoom >= 16], + [feature = 'building_synagogue'][zoom >= 16], + [feature = 'building_temple'][zoom >= 16], + [feature = 'building_mosque'][zoom >= 16], + [feature = 'building_church'][zoom >= 16], + [feature = 'building_chapel'][zoom >= 16], + [feature = 'building_cathedral'][zoom >= 16], + [feature = 'amenity_place_of_worship'][zoom >= 16] { text-name: "[name]"; text-size: @standard-text-size; text-fill: #000033; @@ -2223,4 +2247,3 @@ } } } - diff --git a/buildings.mss b/buildings.mss index 482633fc5f..01ad51bd04 100644 --- a/buildings.mss +++ b/buildings.mss @@ -33,10 +33,17 @@ line-color: @building-aeroway-line; } } + [building = 'cathedral'], + [building = 'chapel'], + [building = 'church'], + [building = 'mosque'], + [building = 'temple'], + [building = 'synagogue'], + [building = 'shrine'], [amenity = 'place_of_worship'] { polygon-fill: @building-major-fill; polygon-clip: false; - [zoom >= 15] { + [zoom >= 14] { line-width: .75; line-clip: false; line-color: @building-major-line; diff --git a/landcover.mss b/landcover.mss index 068406759d..d3cf916b0b 100644 --- a/landcover.mss +++ b/landcover.mss @@ -159,6 +159,14 @@ } } + [feature = 'man_made_campanile'][zoom >= 13], + [feature = 'building_shrine'][zoom >= 13], + [feature = 'building_synagogue'][zoom >= 13], + [feature = 'building_temple'][zoom >= 13], + [feature = 'building_mosque'][zoom >= 13], + [feature = 'building_church'][zoom >= 13], + [feature = 'building_chapel'][zoom >= 13], + [feature = 'building_cathedral'][zoom >= 13], [feature = 'amenity_place_of_worship'][zoom >= 13] { polygon-fill: @place_of_worship; polygon-clip: false; diff --git a/project.mml b/project.mml index f164e78847..6c3ea0520d 100644 --- a/project.mml +++ b/project.mml @@ -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, wetland, power, landuse, leisure, military, \"natural\", 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', 'motorcycle_parking', 'university', 'college', 'school', \n 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') \n THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', \n 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', \n 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', \n 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', \n 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', \n 'track', 'dog_park') 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', 'shoal', 'heath', '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') 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', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', \n 'grave_yard', 'place_of_worship', 'prison', 'clinic')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'shoal', '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')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC\n ) AS landcover\n) AS features", + "table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, wetland, power, landuse, leisure, military, \"natural\", 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', 'motorcycle_parking', 'university', 'college', 'school', \n 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic') \n THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', \n 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', \n 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', \n 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', \n 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', \n 'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('building_' || (CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END)) AS building,\n ('man_made_' || (CASE WHEN man_made IN ('tower', 'campanile') THEN man_made ELSE NULL END)) AS man_made,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'shoal', 'heath', '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') 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', 'motorcycle_parking', 'university', 'college', 'school', 'hospital', 'kindergarten', \n 'grave_yard', 'place_of_worship', 'prison', 'clinic')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'shoal', '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')\n OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral')\n OR man_made IN ('campanile')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY CASE WHEN layer~E'^-?\\\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC\n ) AS landcover\n) AS features", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -561,7 +561,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,\n building,\n amenity,\n aeroway\n FROM planet_osm_polygon\n WHERE building IS NOT NULL\n AND building != 'no'\n AND (aeroway = 'terminal' OR amenity = 'place_of_worship')\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC)\nAS buildings_major", + "table": "(SELECT\n way,\n building,\n amenity,\n aeroway\n FROM planet_osm_polygon\n WHERE building IS NOT NULL\n AND building != 'no'\n AND (aeroway = 'terminal' OR amenity = 'place_of_worship' OR man_made IN ('campanile')\n OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral'))\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC)\nAS buildings_major", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1397,7 +1397,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,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', \n 'hostel', 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain',\n 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', \n 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', \n 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', \n 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', \n 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', \n 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', \n 'photo', 'photo_studio', 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', \n 'mobile_phone', 'motorcycle', 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', \n 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', \n 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', \n 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', 'baby_goods', 'bathroom_furnishing', \n 'bed', 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', \n 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', \n 'deli', 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', \n 'fabric', 'fishing', 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', \n 'gallery', 'games', 'gas', 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', \n 'herbalist', 'hobby', 'household', 'houseware', 'hunting', 'interior_decoration', 'kitchen', \n 'leather', 'lighting', 'locksmith', 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', \n 'motorcycle_repair', 'music', 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', \n 'phone', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', \n 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', \n 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', \n 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('spring') THEN \"natural\" ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END,\n 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE aeroway IN ('helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')\n OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre',\n 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', \n 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', \n 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', \n 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', 'taxi', \n 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', 'veterinary',\n 'social_facility', 'charging_station')\n OR shop IS NOT NULL -- skip checking a huge list and use a null check\n OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk')\n OR \"natural\" IN ('spring')\n OR historic IN ('memorial', 'monument', 'archaeological_site')\n OR highway IN ('bus_stop', 'elevator', 'traffic_signals')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ORDER BY way_area desc\n) AS amenity_points_poly", + "table": "(SELECT\n way,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', \n 'hostel', 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain',\n 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', \n 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', \n 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', \n 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', \n 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', \n 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', \n 'photo', 'photo_studio', 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', \n 'mobile_phone', 'motorcycle', 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', \n 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', \n 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', \n 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', 'baby_goods', 'bathroom_furnishing', \n 'bed', 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', \n 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', \n 'deli', 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', \n 'fabric', 'fishing', 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', \n 'gallery', 'games', 'gas', 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', \n 'herbalist', 'hobby', 'household', 'houseware', 'hunting', 'interior_decoration', 'kitchen', \n 'leather', 'lighting', 'locksmith', 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', \n 'motorcycle_repair', 'music', 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', \n 'phone', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', \n 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', \n 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', \n 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END,\n 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'campanile') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('spring') THEN \"natural\" ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END,\n 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels\n FROM planet_osm_polygon\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE aeroway IN ('helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')\n OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre',\n 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', \n 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', \n 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', \n 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', 'taxi', \n 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', 'veterinary',\n 'social_facility', 'charging_station')\n OR shop IS NOT NULL -- skip checking a huge list and use a null check\n OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table')\n OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'campanile')\n OR \"natural\" IN ('spring')\n OR historic IN ('memorial', 'monument', 'archaeological_site')\n OR highway IN ('bus_stop', 'elevator', 'traffic_signals')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ORDER BY way_area desc\n) AS amenity_points_poly", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1423,7 +1423,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,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain',\n 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', \n 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', \n 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', \n 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', \n 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', \n 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', \n 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', \n 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', \n 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', \n 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', 'baby_goods', 'bathroom_furnishing', 'bed', \n 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', \n 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', 'deli', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', \n 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', 'lottery', \n 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', 'office_supplies', \n 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', 'printing', 'radiotechnics', \n 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', \n 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', \n 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',\n 'dog_park') THEN leisure ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN \"natural\" ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END,\n 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END\n ) AS feature,\n access,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') THEN\n CASE\n WHEN ele ~ '^-?\\d{1,4}(\\.\\d+)?$' THEN ele::NUMERIC\n ELSE NULL\n END\n ELSE NULL\n END AS score,\n religion,\n denomination,\n \"generator:source\",\n power_source,\n NULL AS way_pixels\n FROM planet_osm_point\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE aeroway IN ('helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')\n OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre',\n 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', \n 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', \n 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', \n 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', \n 'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', \n 'veterinary', 'social_facility', 'charging_station')\n OR shop IS NOT NULL -- skip checking a huge list and use a null check\n OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',\n 'dog_park')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')\n OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')\n OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ORDER BY score DESC NULLS LAST\n ) AS amenity_points", + "table": "(SELECT\n way,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre', 'fire_station', 'fountain',\n 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', 'townhall', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', 'dentist', 'place_of_worship', \n 'police', 'post_box', 'post_office', 'pub', 'biergarten', 'recycling', 'restaurant', 'food_court', \n 'fast_food', 'telephone', 'emergency_phone', 'taxi', 'theatre', 'toilets', 'drinking_water', \n 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', \n 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', \n 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', \n 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', \n 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', \n 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', \n 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', 'baby_goods', 'bathroom_furnishing', 'bed', \n 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', \n 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', 'deli', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', \n 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', 'lottery', \n 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', 'office_supplies', \n 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', 'printing', 'radiotechnics', \n 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', 'sewing', 'shoe_repair', 'shopping_centre', \n 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', \n 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',\n 'dog_park') THEN leisure ELSE NULL END,\n 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'campanile') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN \"natural\" ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END,\n 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross', 'campanile') THEN man_made ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END\n ) AS feature,\n access,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') THEN\n CASE\n WHEN ele ~ '^-?\\d{1,4}(\\.\\d+)?$' THEN ele::NUMERIC\n ELSE NULL\n END\n ELSE NULL\n END AS score,\n religion,\n denomination,\n \"generator:source\",\n power_source,\n NULL AS way_pixels\n FROM planet_osm_point\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE aeroway IN ('helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'guest_house', 'hostel', \n 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site')\n OR amenity IN ('shelter', 'atm', 'bank', 'bar', 'bicycle_rental', 'bus_station', 'cafe', \n 'car_rental', 'car_wash', 'cinema', 'clinic', 'community_centre',\n 'fire_station', 'fountain', 'fuel', 'hospital', 'ice_cream', 'embassy', 'library', 'courthouse', \n 'townhall', 'parking', 'bicycle_parking', 'motorcycle_parking', 'pharmacy', 'doctors', \n 'dentist', 'place_of_worship', 'police', 'post_box', 'post_office', 'pub', 'biergarten', \n 'recycling', 'restaurant', 'food_court', 'fast_food', 'telephone', 'emergency_phone', \n 'taxi', 'theatre', 'toilets', 'drinking_water', 'prison', 'hunting_stand', 'nightclub', \n 'veterinary', 'social_facility', 'charging_station')\n OR shop IS NOT NULL -- skip checking a huge list and use a null check\n OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',\n 'dog_park')\n OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'campanile')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')\n OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')\n OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ORDER BY score DESC NULLS LAST\n ) AS amenity_points", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1711,7 +1711,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,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', \n 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', \n 'theatre', 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', \n 'grave_yard', 'shelter', 'bank', 'embassy', 'fuel', 'bus_station', 'prison', 'university', \n 'school', 'college', 'kindergarten', 'hospital', 'ice_cream', 'pharmacy', 'doctors', 'dentist', \n 'atm', 'bicycle_rental', 'car_rental', 'car_wash', 'post_box', 'post_office',\n 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', 'drinking_water', 'hunting_stand', \n 'nightclub', 'veterinary', 'social_facility', 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', \n 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', \n 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', \n 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', \n 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', \n 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', \n 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', 'baby_goods', 'bathroom_furnishing', 'bed', \n 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', \n 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', 'deli', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', \n 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', \n 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', \n 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', \n 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', \n 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'tea', \n 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', \n 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', \n 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', \n 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,\n 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,\n 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', \n 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', \n 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', \n 'construction', 'military') THEN landuse ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', \n 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,\n 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END\n ) AS feature,\n access,\n name,\n operator,\n ref,\n way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_polygon\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', \n 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')\n OR amenity IS NOT NULL -- skip checking a huge list and use a null check\n OR shop IS NOT NULL\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')\n OR \"natural\" IS NOT NULL\n OR place IN ('island', 'islet')\n OR military IN ('danger_area')\n OR historic IN ('memorial', 'monument', 'archaeological_site')\n OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford')\n OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')\n OR boundary IN ('national_park')\n OR waterway = 'dam')\n AND (name IS NOT NULL\n OR (ref IS NOT NULL AND aeroway IN ('gate'))\n )\n ORDER BY way_area DESC\n) AS text_poly", + "table": "(SELECT\n way,\n way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', \n 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', \n 'theatre', 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', \n 'bicycle_parking', 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', \n 'grave_yard', 'shelter', 'bank', 'embassy', 'fuel', 'bus_station', 'prison', 'university', \n 'school', 'college', 'kindergarten', 'hospital', 'ice_cream', 'pharmacy', 'doctors', 'dentist', \n 'atm', 'bicycle_rental', 'car_rental', 'car_wash', 'post_box', 'post_office',\n 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', 'drinking_water', 'hunting_stand', \n 'nightclub', 'veterinary', 'social_facility', 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', \n 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', \n 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', \n 'photography', 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', \n 'musical_instrument', 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', \n 'travel_agency', 'car_parts', 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', \n 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', 'baby_goods', 'bathroom_furnishing', 'bed', \n 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'camera', 'car_service', 'carpet', 'charity', \n 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', 'deli', \n 'discount', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', \n 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', \n 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', \n 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', \n 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', \n 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', 'tea', \n 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', \n 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', \n 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', \n 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,\n 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,\n 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', \n 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', \n 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', \n 'construction', 'military') THEN landuse ELSE NULL END,\n 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'campanile') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', \n 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,\n 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END\n ) AS feature,\n access,\n name,\n operator,\n ref,\n way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_polygon\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', \n 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')\n OR amenity IS NOT NULL -- skip checking a huge list and use a null check\n OR shop IS NOT NULL\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral')\n OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'campanile')\n OR \"natural\" IS NOT NULL\n OR place IN ('island', 'islet')\n OR military IN ('danger_area')\n OR historic IN ('memorial', 'monument', 'archaeological_site')\n OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford')\n OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')\n OR boundary IN ('national_park')\n OR waterway = 'dam')\n AND (name IS NOT NULL\n OR (ref IS NOT NULL AND aeroway IN ('gate'))\n )\n ORDER BY way_area DESC\n) AS text_poly", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1763,7 +1763,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,\n way_pixels,\n feature,\n access,\n CONCAT(\n name,\n CASE WHEN name IS NOT NULL AND elevation IS NOT NULL THEN E'\\n' ELSE NULL END,\n CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\\2212'), U&'\\00A0', 'm') ELSE NULL END\n ) AS name,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') THEN elevation\n ELSE NULL\n END AS score,\n operator,\n ref,\n way_area,\n is_building\n FROM\n (SELECT\n way,\n NULL AS way_pixels,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', \n 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', \n 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', 'bicycle_parking', \n 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', 'grave_yard', 'shelter', 'bank', \n 'embassy', 'fuel', 'bus_station', 'prison', 'university', 'school', 'college', 'kindergarten', 'hospital', \n 'ice_cream', 'pharmacy', 'doctors', 'dentist', 'atm', 'bicycle_rental', 'car_rental',\n 'car_wash', 'post_box', 'post_office', 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', \n 'drinking_water', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag','bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', \n 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', \n 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', 'photography', \n 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', 'musical_instrument', \n 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', \n 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', \n 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', \n 'baby_goods', 'bathroom_furnishing', 'bed', 'boat', 'bookmaker', 'boutique', 'builder', \n 'building_materials', 'camera', 'car_service', 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', \n 'communication', 'craft', 'curtain', 'dairy', 'deli', 'discount', \n 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', 'flooring', \n 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', \n 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', \n 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', \n 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', \n 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', \n 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', \n 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', \n 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', \n 'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,\n 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,\n 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', \n 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', \n 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', \n 'construction', 'military') THEN landuse ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', \n 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') \n THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,\n 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END\n ) AS feature,\n access,\n name,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN\n CASE\n WHEN ele ~ '^-?\\d{1,4}(\\.\\d+)?$' THEN ele::NUMERIC\n ELSE NULL\n END\n ELSE NULL\n END AS elevation,\n \"natural\",\n operator,\n ref,\n NULL AS way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_point\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', \n 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')\n OR amenity IS NOT NULL -- skip checking a huge list and use a null check\n OR shop IS NOT NULL\n OR leisure IS NOT NULL\n OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', \n 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', \n 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military')\n OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk')\n OR \"natural\" IS NOT NULL\n OR place IN ('island', 'islet')\n OR military IN ('danger_area')\n OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')\n OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford')\n OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')\n OR boundary IN ('national_park')\n OR waterway IN ('dam', 'weir'))\n AND (name IS NOT NULL\n OR (ele IS NOT NULL AND (\"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter'))\n OR (ref IS NOT NULL AND aeroway IN ('gate'))\n )\n ) AS p\n ORDER BY score DESC NULLS LAST\n ) AS text", + "table": "(SELECT\n way,\n way_pixels,\n feature,\n access,\n CONCAT(\n name,\n CASE WHEN name IS NOT NULL AND elevation IS NOT NULL THEN E'\\n' ELSE NULL END,\n CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\\2212'), U&'\\00A0', 'm') ELSE NULL END\n ) AS name,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') THEN elevation\n ELSE NULL\n END AS score,\n operator,\n ref,\n way_area,\n is_building\n FROM\n (SELECT\n way,\n NULL AS way_pixels,\n COALESCE(\n 'aeroway_' || CASE WHEN aeroway IN ('gate', 'apron', 'helipad', 'aerodrome') THEN aeroway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', \n 'theme_park', 'museum', 'zoo', 'information', 'picnic_site') THEN tourism ELSE NULL END,\n 'amenity_' || CASE WHEN amenity IN ('pub', 'restaurant', 'food_court', 'cafe', 'fast_food', 'biergarten', 'bar', 'library', 'theatre', \n 'courthouse', 'townhall', 'cinema', 'clinic', 'community_centre', 'parking', 'bicycle_parking', \n 'motorcycle_parking', 'police', 'fire_station', 'fountain', 'place_of_worship', 'grave_yard', 'shelter', 'bank', \n 'embassy', 'fuel', 'bus_station', 'prison', 'university', 'school', 'college', 'kindergarten', 'hospital', \n 'ice_cream', 'pharmacy', 'doctors', 'dentist', 'atm', 'bicycle_rental', 'car_rental',\n 'car_wash', 'post_box', 'post_office', 'recycling', 'telephone', 'emergency_phone', 'toilets', 'taxi', \n 'drinking_water', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility',\n 'charging_station') THEN amenity ELSE NULL END,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bag','bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', \n 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', \n 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', 'photo', 'photo_studio', 'photography', \n 'seafood', 'shoes', 'alcohol', 'gift', 'furniture', 'kiosk', 'mobile_phone', 'motorcycle', 'musical_instrument', \n 'newsagent', 'optician', 'jewelry', 'jewellery', 'electronics', 'chemist', 'toys', 'travel_agency', 'car_parts', \n 'greengrocer', 'farm', 'stationery', 'laundry', 'dry_cleaning', 'beverages', 'perfumery', 'cosmetics', \n 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', 'art', \n 'baby_goods', 'bathroom_furnishing', 'bed', 'boat', 'bookmaker', 'boutique', 'builder', \n 'building_materials', 'camera', 'car_service', 'carpet', 'charity', 'cheese', 'chocolate', 'coffee', \n 'communication', 'craft', 'curtain', 'dairy', 'deli', 'discount', \n 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', 'flooring', \n 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', \n 'general', 'glaziery', 'grocery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', \n 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'leather', 'lighting', 'locksmith', \n 'lottery', 'market', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', \n 'office_supplies', 'organic', 'paint', 'pastry', 'pawnbroker', 'phone', 'pottery', \n 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'second_hand', \n 'sewing', 'shoe_repair', 'shopping_centre', 'solarium', 'souvenir', 'tailor', 'tanning', 'tattoo', \n 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', \n 'wholesale', 'yes') THEN 'other' ELSE NULL END,\n 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'sports_centre', 'stadium', 'track', \n 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', \n 'slipway', 'picnic_table', 'dog_park') THEN leisure ELSE NULL END,\n 'power_' || CASE WHEN power IN ('plant', 'station', 'generator', 'sub_station', 'substation') THEN power ELSE NULL END,\n 'landuse_' || CASE WHEN landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', \n 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', \n 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', \n 'construction', 'military') THEN landuse ELSE NULL END,\n 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk', 'campanile') THEN man_made ELSE NULL END,\n 'natural_' || CASE WHEN \"natural\" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', \n 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') \n THEN \"natural\" ELSE NULL END,\n 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,\n 'military_' || CASE WHEN military IN ('danger_area') THEN military ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,\n 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END,\n 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END,\n 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END,\n 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END,\n 'man_made_' || CASE WHEN man_made IN ('cross', 'campanile') THEN man_made ELSE NULL END,\n 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END\n ) AS feature,\n access,\n name,\n CASE\n WHEN \"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN\n CASE\n WHEN ele ~ '^-?\\d{1,4}(\\.\\d+)?$' THEN ele::NUMERIC\n ELSE NULL\n END\n ELSE NULL\n END AS elevation,\n \"natural\",\n operator,\n ref,\n NULL AS way_area,\n CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building\n FROM planet_osm_point\n -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering\n WHERE (aeroway IN ('gate', 'apron', 'helipad', 'aerodrome')\n OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'guest_house', 'camp_site', 'caravan_site', 'theme_park', \n 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site')\n OR amenity IS NOT NULL -- skip checking a huge list and use a null check\n OR shop IS NOT NULL\n OR leisure IS NOT NULL\n OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', \n 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', \n 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military')\n OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral')\n OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk', 'campanile')\n OR \"natural\" IS NOT NULL\n OR place IN ('island', 'islet')\n OR military IN ('danger_area')\n OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')\n OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford')\n OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')\n OR boundary IN ('national_park')\n OR waterway IN ('dam', 'weir'))\n AND (name IS NOT NULL\n OR (ele IS NOT NULL AND (\"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter'))\n OR (ref IS NOT NULL AND aeroway IN ('gate'))\n )\n ) AS p\n ORDER BY score DESC NULLS LAST\n ) AS text", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index 98b4b782ed..f74bdc36b5 100644 --- a/project.yaml +++ b/project.yaml @@ -155,6 +155,8 @@ Layer: 'golf_course', 'miniature_golf', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track', 'dog_park') THEN leisure ELSE NULL END)) AS leisure, ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military, + ('building_' || (CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END)) AS building, + ('man_made_' || (CASE WHEN man_made IN ('tower', 'campanile') THEN man_made ELSE NULL END)) AS man_made, ('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', '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, @@ -173,6 +175,8 @@ Layer: OR "natural" IN ('beach', 'shoal', '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') + OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') + OR man_made IN ('campanile') OR highway IN ('services', 'rest_area') OR railway = 'station') AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real @@ -479,7 +483,8 @@ Layer: FROM planet_osm_polygon WHERE building IS NOT NULL AND building != 'no' - AND (aeroway = 'terminal' OR amenity = 'place_of_worship') + AND (aeroway = 'terminal' OR amenity = 'place_of_worship' OR man_made IN ('campanile') + OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral')) AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real ORDER BY z_order, way_area DESC) AS buildings_major @@ -1679,7 +1684,8 @@ Layer: 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'trade', 'tyres', 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, + 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'campanile') THEN man_made ELSE NULL END, 'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END, 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END, @@ -1707,7 +1713,8 @@ Layer: 'social_facility', 'charging_station') OR shop IS NOT NULL -- skip checking a huge list and use a null check OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') - OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') + OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') + OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'campanile') OR "natural" IN ('spring') OR historic IN ('memorial', 'monument', 'archaeological_site') OR highway IN ('bus_stop', 'elevator', 'traffic_signals') @@ -1760,13 +1767,14 @@ Layer: 'vacuum_cleaner', 'video', 'video_games', 'watches', 'wholesale', 'yes') THEN 'other' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', 'dog_park') THEN leisure ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, + 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'campanile') THEN man_made ELSE NULL END, 'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END, 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END, 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END, 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('cross', 'campanile') THEN man_made ELSE NULL END, 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END ) AS feature, access, @@ -1799,7 +1807,8 @@ Layer: OR shop IS NOT NULL -- skip checking a huge list and use a null check OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', 'dog_park') - OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk') + OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') + OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'campanile') OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') @@ -2086,7 +2095,8 @@ Layer: 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military') THEN landuse ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END, + 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'campanile') THEN man_made ELSE NULL END, 'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END, 'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END, @@ -2112,7 +2122,8 @@ Layer: OR shop IS NOT NULL OR leisure IS NOT NULL OR landuse IS NOT NULL - OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') + OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') + OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'campanile') OR "natural" IS NOT NULL OR place IN ('island', 'islet') OR military IN ('danger_area') @@ -2229,7 +2240,8 @@ Layer: 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military') THEN landuse ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END, + 'building_' || CASE WHEN building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') THEN building ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk', 'campanile') THEN man_made ELSE NULL END, 'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') THEN "natural" ELSE NULL END, @@ -2240,7 +2252,7 @@ Layer: 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END, - 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, + 'man_made_' || CASE WHEN man_made IN ('cross', 'campanile') THEN man_made ELSE NULL END, 'historic_' || CASE WHEN historic IN ('wayside_cross') THEN historic ELSE NULL END ) AS feature, access, @@ -2269,7 +2281,8 @@ Layer: OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military') - OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk') + OR building IN ('church', 'shrine', 'synagogue', 'temple', 'mosque', 'chapel', 'cathedral') + OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk', 'campanile') OR "natural" IS NOT NULL OR place IN ('island', 'islet') OR military IN ('danger_area')