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 c1fba3b0d3..ad9204630a 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 8b8adfccea..d13d388424 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" @@ -1735,7 +1735,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, @@ -1746,6 +1746,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 @@ -1763,7 +1764,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')) @@ -2221,12 +2222,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 0000000000..f85f95b67c Binary files /dev/null and b/symbols/arete_large.png differ diff --git a/symbols/arete_medium.png b/symbols/arete_medium.png new file mode 100644 index 0000000000..9070707577 Binary files /dev/null and b/symbols/arete_medium.png differ diff --git a/symbols/arete_small.png b/symbols/arete_small.png new file mode 100644 index 0000000000..7f2c6894e7 Binary files /dev/null and b/symbols/arete_small.png differ diff --git a/symbols/ridge_large.png b/symbols/ridge_large.png new file mode 100644 index 0000000000..fb4c326128 Binary files /dev/null and b/symbols/ridge_large.png differ diff --git a/symbols/ridge_medium.png b/symbols/ridge_medium.png new file mode 100644 index 0000000000..d9d80e9c79 Binary files /dev/null and b/symbols/ridge_medium.png differ diff --git a/symbols/ridge_small.png b/symbols/ridge_small.png new file mode 100644 index 0000000000..4b91710d55 Binary files /dev/null and b/symbols/ridge_small.png differ