From 22e1c5e2d75d49427afa38c9b2b8ce808a938934 Mon Sep 17 00:00:00 2001 From: Ircama Date: Fri, 12 Aug 2016 14:35:35 +0200 Subject: [PATCH] **Rendering of valleys, ridges and other mountain elements** Latest changes: - Rebased so that it can be easily reviewed/merged Previous changes: - Removed hstore usage - Revised way_length calculation - Improved symbology --- landcover.mss | 234 ++++++++++++++++++++++++++++++++++++++- project.mml | 12 +- project.yaml | 20 ++-- symbols/arete_large.png | Bin 0 -> 614 bytes symbols/arete_medium.png | Bin 0 -> 414 bytes symbols/arete_small.png | Bin 0 -> 374 bytes symbols/ridge_large.png | Bin 0 -> 629 bytes symbols/ridge_medium.png | Bin 0 -> 533 bytes symbols/ridge_small.png | Bin 0 -> 372 bytes 9 files changed, 248 insertions(+), 18 deletions(-) create mode 100644 symbols/arete_large.png create mode 100644 symbols/arete_medium.png create mode 100644 symbols/arete_small.png create mode 100644 symbols/ridge_large.png create mode 100644 symbols/ridge_medium.png create mode 100644 symbols/ridge_small.png diff --git a/landcover.mss b/landcover.mss index bd83fea3e5..ca3c991d23 100644 --- a/landcover.mss +++ b/landcover.mss @@ -7,6 +7,18 @@ @park: #c8facc; // Lch(94,30,145) also recreation_ground @orchard: #aedfa3; +// --- Reliefs + +@ridge-text: #7A2F18; +@valley-text: #305040; +@mountain_range-text: #C03A01; +@massif-text: #C03A01; +@cliff-text: #999; +@arete-text: #800000; +@couloir-text: #0080C0; +@dale-text: #008000; +@gorge-text: #800040; + // --- "base" landuses --- @residential: #e0dfdf; // Lch(89,0,0) @@ -646,7 +658,27 @@ } } -#cliffs { +#relief-symbol { + [natural = 'arete'][zoom >= 12] { + line-pattern-smooth: 0.15; + line-pattern-file: url('symbols/arete_small.png'); + [zoom >= 15] { + line-pattern-file: url('symbols/arete_medium.png'); + } + [zoom >= 16] { + line-pattern-file: url('symbols/arete_large.png'); + } + } + [natural = 'ridge'][zoom >= 12] { + line-pattern-smooth: 0.15; + line-pattern-file: url('symbols/ridge_small.png'); + [zoom >= 15] { + line-pattern-file: url('symbols/ridge_medium.png'); + } + [zoom >= 16] { + line-pattern-file: url('symbols/ridge_large.png'); + } + } [natural = 'cliff'][zoom >= 13] { line-pattern-file: url('symbols/cliff.png'); [zoom >= 15] { @@ -723,8 +755,9 @@ } } +#text-point[zoom >= 15], #text-line { - [feature = 'natural_cliff'][zoom >= 15], + [feature = 'natural_cliff'][zoom >= 11], [feature = 'man_made_embankment'][zoom >= 15] { text-name: "[name]"; text-halo-radius: @standard-halo-radius; @@ -732,9 +765,204 @@ text-fill: #999; text-size: 10; text-face-name: @book-fonts; - text-placement: line; text-dy: 8; text-vertical-alignment: middle; text-spacing: 400; + #text-line { + text-placement: line; + } + #text-point { + text-placement: point; + text-dy: 8; + text-size: 10; + } + } + [feature = 'natural_dale'][zoom >= 13], + [feature = 'natural_gorge'][zoom >= 14], + [feature = 'natural_couloir'][zoom >= 14], + [feature = 'natural_ridge'][zoom >= 8]::foreground, + [feature = 'natural_arete'][zoom >= 8]::foreground, + [feature = 'natural_massif'][zoom >= 15]#text-point, // node visibility given to mappers at high zoom, to help debugging tags to be changed to polylines + [feature = 'natural_mountain_range'][zoom >= 15]#text-point, // node visibility given to mappers at high zoom, to help debugging tags to be changed to polylines + [feature = 'natural_valley'][zoom >= 8]::foreground { + [feature = 'natural_dale'] { text-fill: @dale-text; } + [feature = 'natural_gorge'] { text-fill: @gorge-text; } + [feature = 'natural_couloir'] { text-fill: @couloir-text; } + [feature = 'natural_ridge'] { text-fill: @ridge-text; } + [feature = 'natural_arete'] { text-fill: @arete-text; } + [feature = 'natural_valley'] { text-fill: @valley-text; } + [feature = 'natural_massif'] { + text-fill: @massif-text; + text-transform: uppercase; + } + [feature = 'natural_mountain_range'] { + text-fill: @mountain_range-text; + text-transform: uppercase; + } + // general settings + text-halo-radius: 2; + text-halo-fill: rgba(255,255,255,0.6); + text-opacity: 1; + [zoom >= 10] { + text-opacity: 0.7; + } + text-dx: 8; + text-dy: 8; + text-spacing: 760; + text-face-name: @oblique-fonts; + text-wrap-width: 2; + text-name: "[name]"; + [zoom >= 10] { + text-size: 10; + text-opacity: 0.4; + } + [zoom >= 13] { + text-size: 13; + text-character-spacing: 5; + text-opacity: 0.6; + } + [zoom >= 14] { + text-size: 12; + text-character-spacing: 3; + } + [zoom >= 15] { + text-size: 16; + text-dx: 15; + text-dy: 15; + text-character-spacing: 6; + } + [zoom >= 16] { + text-size: 18; + text-character-spacing: 12; + } + #text-line { + text-max-char-angle-delta: 30; + text-placement: line; + text-placement-type: simple; + [zoom < 15] { + text-placements: "N,S,E,W,NE,SE,NW,SW,18,16,14,12,10,9,8"; + } + [way_length > 60] { + text-dx: 11; + text-dy: 11; + text-size: 11; + text-character-spacing: 3; + text-wrap-width: 100; + text-opacity: 0.5; + } + [zoom = 10][way_length > 125] { + text-character-spacing: 2; + text-size: 13; + } + [zoom = 11][way_length > 250] { + text-size: 13; + text-character-spacing: 6; + text-opacity: 0.6; + } + [zoom = 12][way_length > 500] { + text-size: 14; + text-character-spacing: 7; + text-opacity: 0.6; + text-transform: uppercase; + } + [zoom = 13][way_length > 1000] { + text-size: 15; + text-character-spacing: 10; + text-opacity: 0.6; + text-max-char-angle-delta: 10; + text-transform: uppercase; + } + [zoom = 14][way_length > 2000] { + text-size: 20; + text-character-spacing: 10; + text-opacity: 0.5; + text-max-char-angle-delta: 10; + text-transform: uppercase; + text-placement-type: dummy; + } + [zoom >= 15][way_length > 4000] { + text-size: 25; + text-character-spacing: 20; + text-opacity: 0.5; + text-max-char-angle-delta: 10; + text-transform: uppercase; + text-placement-type: dummy; + } + [zoom < 16][name=~'^.{14,}$'] { // improve probability for long names (>=14 characters) to be shown + text-max-char-angle-delta: 30; + text-transform: none; + } + } + [feature = 'natural_dale'], + [feature = 'natural_gorge'], + [feature = 'natural_couloir'], + [feature = 'natural_arete'], + [feature = 'natural_ridge'] { + [zoom >= 10] { text-size: 10; } + [zoom >= 11] { text-size: 12; } + [zoom >= 12] { text-size: 12; } + [zoom >= 13] { text-size: 12; } + [zoom >= 14] { text-size: 12; } + [zoom >= 15] { text-size: 15; } + [zoom >= 16] { text-size: 18; } + } + #text-point { // nodes are only shown for debugging purpose, with fixed rendering + text-placement: point; + text-character-spacing: 0; + text-size: 10; + } + } +} + +#landcover-low-zoom[zoom < 10]::foreground, +#amenity-points-poly[zoom >= 10] { + [feature = 'natural_dale'][zoom >= 14], + [feature = 'natural_gorge'][zoom >= 15], + [feature = 'natural_couloir'][zoom >= 15], + [feature = 'natural_arete'][zoom >= 15], + [feature = 'natural_ridge'][zoom >= 15], + [feature = 'natural_massif'][zoom >= 8], + [feature = 'natural_mountain_range'][zoom >= 8][zoom < 13], + [feature = 'natural_valley'] { + text-halo-radius: 2.5; + text-halo-fill: rgba(255,255,255,0.6); + text-vertical-alignment: middle; + text-opacity: 1; + text-spacing: 760; + text-face-name: @oblique-fonts; + text-wrap-width: 2; + text-placement: interior; + text-placement-type: simple; + text-size: 8; + [zoom >= 9] { text-size: 9; } + [zoom < 11] { text-placements: "N,S,E,W,NE,SE,NW,SW,10,9,8,7"; } + [zoom >= 10] { + text-size: 10; + text-opacity: 0.7; + [way_pixels > 4000] { text-size: 12; } + [way_pixels > 20000][zoom >= 10] { text-size: 14; } + [way_pixels > 60000][zoom >= 11] { text-size: 17; } + [way_pixels > 200000][zoom >= 12] { text-size: 21; } + [way_pixels > 500000][zoom >= 13] { text-size: 25; } + } + text-name: "[name]"; + [feature = 'natural_dale'] { text-fill: @dale-text; } + [feature = 'natural_gorge'] { text-fill: @gorge-text; } + [feature = 'natural_couloir'] { text-fill: @couloir-text; } + [feature = 'natural_ridge'] { text-fill: @ridge-text; } + [feature = 'natural_arete'] { text-fill: @arete-text; } + [feature = 'natural_massif'] { + text-fill: @massif-text; + text-transform: uppercase; + [zoom >= 9] { + text-character-spacing: 3; + } + } + [feature = 'natural_mountain_range'] { + text-fill: @mountain_range-text; + text-transform: uppercase; + [zoom >= 9] { text-character-spacing: 3; } + } + [feature = 'natural_valley'] { text-fill: @valley-text; } } } diff --git a/project.mml b/project.mml index fffc90702c..58870ed651 100644 --- a/project.mml +++ b/project.mml @@ -659,15 +659,15 @@ "advanced": {} }, { - "name": "cliffs", + "name": "relief-symbol", "srs-name": "900913", "geometry": "linestring", "class": "", - "id": "cliffs", + "id": "relief-symbol", "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, \"natural\", man_made\n FROM planet_osm_line\n WHERE \"natural\" = 'cliff' OR man_made = 'embankment'\n) AS cliffs", + "table": "(SELECT\n way, \"natural\", name, ST_Length(way)/NULLIF(SQRT(!pixel_width!::real*!pixel_height!::real),0) AS way_length, man_made\n FROM planet_osm_line\n WHERE \"natural\" in ('cliff', 'arete', 'ridge') OR man_made = 'embankment'\n) AS \"relief-symbol\"", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -680,7 +680,7 @@ 85.05112877980659 ], "properties": { - "minzoom": 13 + "minzoom": 10 }, "advanced": {} }, @@ -1425,7 +1425,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', 'deli', 'tobacco', 'art', 'tea') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', '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 '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', 'ticket', 'tiles', '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', 'deli', 'tobacco', 'art', 'tea') THEN shop \n WHEN shop IN ('accessories', 'antiques', 'appliance', '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 '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', 'ticket', 'tiles', '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', 'valley', 'ridge', 'cliff', 'arete', 'dale', 'gorge', 'couloir', 'mountain_range', 'massif') 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 name,\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', 'valley', 'ridge', 'cliff', 'arete', 'dale', 'gorge', 'couloir', 'mountain_range', 'massif')\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": "", @@ -1765,7 +1765,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 NULL as way_pixels,\n COALESCE('man_made_' || man_made, 'waterway_' || waterway, 'natural_' || \"natural\") AS feature,\n access,\n name,\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_line\n WHERE (man_made IN ('pier', 'breakwater', 'groyne', 'embankment')\n OR waterway IN ('dam', 'weir')\n OR \"natural\" IN ('cliff'))\n AND name IS NOT NULL\n) AS text_line", + "table": "(SELECT\n way,\n NULL as way_pixels,\n COALESCE('man_made_' || man_made, 'waterway_' || waterway, 'natural_' || \"natural\") AS feature,\n access,\n name,\n operator,\n ref,\n ST_Length(way)/NULLIF(SQRT(!pixel_width!::real*!pixel_height!::real),0) AS way_length,\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_line\n WHERE (man_made IN ('pier', 'breakwater', 'groyne', 'embankment')\n OR waterway IN ('dam', 'weir')\n OR \"natural\" IN ('cliff', 'ridge', 'valley', 'glacier', 'arete', 'dale', 'gorge', 'couloir', 'mountain_range', 'massif'))\n AND name IS NOT NULL\n) AS text_line", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index 29aa170535..87384c11a9 100644 --- a/project.yaml +++ b/project.yaml @@ -677,8 +677,8 @@ Layer: properties: minzoom: 14 advanced: {} - - id: "cliffs" - name: "cliffs" + - id: "relief-symbol" + name: "relief-symbol" class: "" geometry: "linestring" <<: *extents @@ -686,12 +686,12 @@ Layer: <<: *osm2pgsql table: |- (SELECT - way, "natural", man_made + way, "natural", name, ST_Length(way)/NULLIF(SQRT(!pixel_width!::real*!pixel_height!::real),0) AS way_length, man_made FROM planet_osm_line - WHERE "natural" = 'cliff' OR man_made = 'embankment' - ) AS cliffs + WHERE "natural" in ('cliff', 'arete', 'ridge') OR man_made = 'embankment' + ) AS "relief-symbol" properties: - minzoom: 13 + minzoom: 10 advanced: {} - id: "area-barriers" name: "area-barriers" @@ -1732,7 +1732,7 @@ Layer: '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, - 'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END, + 'natural_' || CASE WHEN "natural" IN ('spring', 'valley', 'ridge', 'cliff', 'arete', 'dale', 'gorge', 'couloir', 'mountain_range', 'massif') 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, 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, @@ -1743,6 +1743,7 @@ Layer: denomination, "generator:source", power_source, + name, way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels FROM planet_osm_polygon -- The upcoming where clause is needed for performance only, as the CASE statements would end up doing the equivalent filtering @@ -1760,7 +1761,7 @@ 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') OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') - OR "natural" IN ('spring') + OR "natural" IN ('spring', 'valley', 'ridge', 'cliff', 'arete', 'dale', 'gorge', 'couloir', 'mountain_range', 'massif') OR historic IN ('memorial', 'monument', 'archaeological_site') OR highway IN ('bus_stop', 'elevator', 'traffic_signals') OR (power = 'generator' AND ("generator:source" = 'wind' OR power_source = 'wind')) @@ -2218,12 +2219,13 @@ Layer: name, operator, ref, + ST_Length(way)/NULLIF(SQRT(!pixel_width!::real*!pixel_height!::real),0) AS way_length, NULL AS way_area, CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building FROM planet_osm_line WHERE (man_made IN ('pier', 'breakwater', 'groyne', 'embankment') OR waterway IN ('dam', 'weir') - OR "natural" IN ('cliff')) + OR "natural" IN ('cliff', 'ridge', 'valley', 'glacier', 'arete', 'dale', 'gorge', 'couloir', 'mountain_range', 'massif')) AND name IS NOT NULL ) AS text_line advanced: {} diff --git a/symbols/arete_large.png b/symbols/arete_large.png new file mode 100644 index 0000000000000000000000000000000000000000..f85f95b67ca1f2746fe63b7195c6d5b4e094acd9 GIT binary patch literal 614 zcmeAS@N?(olHy`uVBq!ia0vp^{6MVA!3HGfKHMw?q&N#aB8wRq_>O=u<5X=vX`mo` ziKnkC`vZ1qQ4Y}n$4ytjLaq@dj-@3T`9%yX*PZbI3h|Txg;oF&M`+;I?AY~z$B{``KE8bmFXJBA7^mK6y@#x$eVz};*0Z(Z$ zS6bPO#OG=?PZ?a3T$9?@PP)8V!R=JXshD*_Vlt}7JcW-OpR`n^>{0sh^9gHNJ$nt! z(v*Frj?1lBv-QKu6*0%R<=$UZqrU0Orxm@E-tS)cZudex&A6-O&b$l;(LVi}9p7Is zW@C8q>#}2ZEbGMM``n$rrFl3$U&Y}S))@Cev-Q!tPl0N4dkw=*O|7|WpS^aqNKE`3 z{q`w`mn}$8Nv=OTQM2wx)0W=QyP;D1Tzl@vKdZdBFLM^B(z>0pg6BJSurqX&U42?} zTk%o+tJh84Pb8Gt-|tX({xTAz5o058%F(SF+~%NeRfu=a0uET zGZXb`>j-GLnN;;x>&|!pg?LJULN2Mr$wiq3C7Jno48oj> z%0O{0khpVxL1j^9dPWJu8vZj@Kv6!hXi;h+NU1_eW^O8j>34okpbRHSCOAK>q&%@G zl_9p^KS((@*znBalAKhA74I&o14S}DT^vI+CTwMPTPg$N}kZgvMXiO!ft^(t4roy#U=GdZYRw$J1b zJ^DqUcBSR_%)CQ0%Di95?)iP?i}1#WiTu+J+85ujf9Zc(eByK=J^yLnQ)`ZNEC*W3 N;OXk;vd$@?2>?tQi2(or literal 0 HcmV?d00001 diff --git a/symbols/arete_small.png b/symbols/arete_small.png new file mode 100644 index 0000000000000000000000000000000000000000..7f2c6894e7517c58c18e07669ab345d9903db4f8 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^B0$W}!3HEbPUl(xDb50q$YKTtz9S&aI8~cZ8l#0lT!gDtkkiuPj)|HKN3^v?L?Hh+*ZrGaf)8o)VytOKNd)QD#9&W_})nFsGt2 zP@D@S?wnsxS(KTcQNpl>|BMw-ln*Rgl$r=qs!)=do62DNou3mZ!wHfJ&QB{TPb^Ah zh%NXJQqB!FJhM1CClRQ$h++GIE&V`Y4v=toVo_dZUOK}8>1XXgF?NXl(xT*4hOhsd zU&E9+=jZ08=9MsfJ2P!RP>c^6CdL#e< literal 0 HcmV?d00001 diff --git a/symbols/ridge_large.png b/symbols/ridge_large.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4c3261286e8463f28ee907a50bb57df2d59441 GIT binary patch literal 629 zcmeAS@N?(olHy`uVBq!ia0vp^{6MVD!3HFkzrK_Oq&N#aB8wRq_>O=u<5X=vX`mo` ziKnkC`vW#+1{0IJzu)MAg0W#*+b9FTt24isaD=r1iwPG$J| zzxg#xnR9+_Zfaf$!?!cj_5;P(K*~ZgOL9^fR=m5U&cMLv;OXKR;?a3GY_H#81A%?r zGX&n8k)60}L&-zIif%8zH2yuTca@&%+-sV;_ne1~y8c0C8E@H~$;Zl~91>2Ra{csk z-}^dVmm_C*yv>Y^bz)u5B`%$k{_?p_{rsX6n!AdegxkKFw4ZhCy?DUyyAVUd-pIF` zbeGGSyjAeE_TcwDqghtIYx>-GOP_BL*p}IzB6alN+pn7K%UkU^t=$f`)=x}2xioRV zm!{m_wNoAmo=fCZEapf5wDfbp+5hJ-?rITt{;-0dH(;$ h$c+(}zipWqPDN#) zI2TCVIlrK?C^J2ygkcT;87rVDA6T>~H4&s#p(HammBI8oKPOOz6C@LypH@=6B>MaiiQU;j71 zhADH-&&^HED`EI{X4-zB7#m1gNM=b+D#MC*m(+nG4?JBQLo_D#1}X9#auB#PjitZI zB*9^E)-MJYM#et*FO2FNSZsdW&Y!SAL1L2iWwjVtPiY=~2PL-9q6c;78fluw$TZiuLk8M><`}b?T f(A-X!^hcbpdkt=euNAEa`jx@c)z4*}Q$iB}(uKqM literal 0 HcmV?d00001 diff --git a/symbols/ridge_small.png b/symbols/ridge_small.png new file mode 100644 index 0000000000000000000000000000000000000000..4b91710d55362951a970b9323f07113c28c34860 GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0vp^d_c_3!3HEP+-oF(6lZ})WHC_u2naJy)#j51sVMRE zb!C6R#>J(l_dr|qGFZqpqQtSZBqP6wVdc6r9zY?U5}=SvYH@N=WQ0!XYD{Sc8LDcqU2PDum780 z!<0Ga=jNv7l`woeGi^Umj18nLB(o$Zm0`uZOX@%odrud~5Q(YDKmPx>KYV7U@qZwg z&nWv?Xn)C{Ji##67g8HOc5Y*h?MvY;=v|WKuyLY<{ld+i+a6x}xZCx_Cx*jU6t&p4 S{uc)t#o+1c=d#Wzp$PzDk$fQl literal 0 HcmV?d00001