diff --git a/amenity-points.mss b/amenity-points.mss index 4952085dec..b20d9a7482 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -18,6 +18,7 @@ @standard-wrap-width: 30; +/* Note that .points is also used in water-features.mss */ .points { [feature = 'tourism_alpine_hut'][zoom >= 13] { point-file: url('symbols/alpinehut.p.16.png'); @@ -1476,18 +1477,6 @@ } } - [feature = 'waterway_lock'][zoom >= 15] { - text-name: "[name]"; - text-size: 9; - text-dy: 10; - text-fill: #0066ff; - text-face-name: @book-fonts; - text-halo-radius: 1; - text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @standard-wrap-width; - text-placement: interior; - } - [feature = 'leisure_marina'][zoom >= 15] { text-name: "[name]"; text-size: 8; diff --git a/project.mml b/project.mml index 36eb35824f..871c96ca63 100644 --- a/project.mml +++ b/project.mml @@ -283,7 +283,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, waterway, lock, name, intermittent,\n CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel,\n 'no' AS bridge\n FROM planet_osm_line\n WHERE waterway IN ('weir', 'river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct'))\n ORDER BY z_order\n) AS water_lines", + "table": "(SELECT \n way, waterway, lock, name, intermittent,\n CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel,\n 'no' AS bridge\n FROM planet_osm_line\n WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct'))\n ORDER BY z_order\n) AS water_lines", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -301,15 +301,41 @@ "advanced": {} }, { - "name": "dam", + "name": "water-barriers-line", "srs-name": "900913", "geometry": "linestring", "class": "", - "id": "dam", + "id": "water-barriers-line", "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 way, name\n FROM planet_osm_line\n WHERE waterway = 'dam'\n) AS dam", + "table": "(SELECT way, waterway, name \n FROM planet_osm_line \n WHERE waterway IN ('dam', 'weir', 'lock_gate')\n) AS water_barriers_line", + "geometry_field": "way", + "type": "postgis", + "key_field": "", + "dbname": "gis" + }, + "extent": [ + -180, + -85.05112877980659, + 180, + 85.05112877980659 + ], + "properties": { + "minzoom": 13 + }, + "advanced": {} + }, + { + "name": "water-barriers-poly", + "srs-name": "900913", + "geometry": "polygon", + "class": "", + "id": "water-barriers-poly", + "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 way, waterway, name \n FROM planet_osm_polygon \n WHERE waterway IN ('dam', 'weir', 'lock_gate')\n) AS water_barriers_poly", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -353,15 +379,15 @@ "advanced": {} }, { - "name": "piers-area", + "name": "piers-poly", "srs-name": "900913", "geometry": "polygon", "class": "", - "id": "piers-area", + "id": "piers-poly", "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, man_made\n FROM planet_osm_polygon\n WHERE man_made IN ('pier', 'breakwater', 'groyne')\n) AS piers_area", + "table": "(SELECT\n way, man_made\n FROM planet_osm_polygon\n WHERE man_made IN ('pier', 'breakwater', 'groyne')\n) AS piers_poly", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -379,15 +405,15 @@ "advanced": {} }, { - "name": "piers", + "name": "piers-line", "srs-name": "900913", "geometry": "linestring", "class": "", - "id": "piers", + "id": "piers-line", "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, man_made\n FROM planet_osm_line\n WHERE man_made IN ('pier', 'breakwater', 'groyne')\n) AS piers", + "table": "(SELECT\n way, man_made\n FROM planet_osm_line\n WHERE man_made IN ('pier', 'breakwater', 'groyne')\n) AS piers_line", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -405,15 +431,15 @@ "advanced": {} }, { - "name": "locks", + "name": "water-barriers-point", "srs-name": "900913", "geometry": "point", "class": "", - "id": "locks", + "id": "water-barriers-point", "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, waterway\n FROM planet_osm_point\n WHERE waterway = 'lock_gate'\n) AS locks", + "table": "(SELECT \n way, waterway \n FROM planet_osm_point \n WHERE waterway IN ('dam', 'weir', 'lock_gate')\n) AS water_barriers_points", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1402,7 +1428,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_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'waterway_' || waterway,\n 'historic_' || historic,\n 'lock_' || lock,\n 'highway_'|| highway,\n 'power_' || power\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source\n FROM planet_osm_polygon\n WHERE amenity IS NOT NULL\n OR shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR tourism IN ('alpine_hut', 'camp_site', 'picnic_site', 'caravan_site', 'guest_house', 'hostel', 'hotel', 'motel', 'museum', 'viewpoint', 'information', 'chalet')\n OR highway IN ('bus_stop', 'traffic_signals')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill')\n OR historic IN ('memorial', 'archaeological_site')\n OR leisure IN ('water_park', 'playground', 'picnic_table', 'golf_course', 'miniature_golf')\n OR aeroway IN ('aerodrome', 'helipad')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'tree')\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_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'historic_' || historic,\n 'highway_'|| highway,\n 'power_' || power\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source\n FROM planet_osm_polygon\n WHERE amenity IS NOT NULL\n OR shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR tourism IN ('alpine_hut', 'camp_site', 'picnic_site', 'caravan_site', 'guest_house', 'hostel', 'hotel', 'motel', 'museum', 'viewpoint', 'information', 'chalet')\n OR highway IN ('bus_stop', 'traffic_signals')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill')\n OR historic IN ('memorial', 'archaeological_site')\n OR leisure IN ('water_park', 'playground', 'picnic_table', 'golf_course', 'miniature_golf')\n OR aeroway IN ('aerodrome', 'helipad')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'tree')\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": "", @@ -1428,7 +1454,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_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'waterway_' || waterway,\n 'historic_' || historic,\n 'lock_' || lock,\n 'highway_' || highway,\n 'power_' || power\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source\n FROM planet_osm_point\n WHERE shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR amenity IS NOT NULL\n OR tourism IN ('alpine_hut', 'picnic_site', 'camp_site', 'caravan_site', 'guest_house', 'hostel', 'hotel', 'motel', 'museum', 'viewpoint', 'information', 'chalet')\n OR highway IN ('bus_stop', 'traffic_signals', 'ford')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'power_wind', 'windmill')\n OR historic IN ('memorial', 'archaeological_site')\n OR waterway = 'lock'\n OR lock = 'yes'\n OR leisure IN ('water_park', 'playground', 'slipway', 'picnic_table', 'golf_course', 'miniature_golf')\n OR aeroway IN ('aerodrome', 'helipad')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'tree', 'cave_entrance')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ) AS amenity_points", + "table": "(SELECT\n way,\n COALESCE(\n 'aeroway_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'historic_' || historic,\n 'highway_' || highway,\n 'power_' || power\n ) AS feature,\n access,\n religion,\n denomination,\n \"generator:source\",\n power_source\n FROM planet_osm_point\n WHERE shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR amenity IS NOT NULL\n OR tourism IN ('alpine_hut', 'picnic_site', 'camp_site', 'caravan_site', 'guest_house', 'hostel', 'hotel', 'motel', 'museum', 'viewpoint', 'information', 'chalet')\n OR highway IN ('bus_stop', 'traffic_signals', 'ford')\n OR man_made IN ('mast', 'water_tower', 'lighthouse', 'power_wind', 'windmill')\n OR historic IN ('memorial', 'archaeological_site')\n OR leisure IN ('water_park', 'playground', 'slipway', 'picnic_table', 'golf_course', 'miniature_golf')\n OR aeroway IN ('aerodrome', 'helipad')\n OR \"natural\" IN ('peak', 'volcano', 'saddle', 'spring', 'tree', 'cave_entrance')\n OR (power = 'generator' AND (\"generator:source\" = 'wind' OR power_source = 'wind'))\n ) AS amenity_points", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1690,7 +1716,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_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'waterway_' || waterway,\n 'historic_' || historic,\n 'highway_' || highway,\n 'power_' || power,\n 'boundary_' || boundary\n ) AS feature,\n access,\n name,\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 WHERE amenity IS NOT NULL\n OR shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR tourism IS NOT NULL\n OR \"natural\" IS NOT NULL\n OR man_made IN ('lighthouse', 'windmill')\n OR place = 'island'\n OR place = 'islet'\n OR military IS NOT NULL\n OR historic IN ('memorial', 'archaeological_site')\n OR power IS NOT NULL\n OR aeroway IS NOT NULL\n OR highway IN ('services', 'rest_area')\n OR boundary = 'national_park'\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_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'waterway_' || waterway,\n 'historic_' || historic,\n 'highway_' || highway,\n 'power_' || power,\n 'boundary_' || boundary\n ) AS feature,\n access,\n name,\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 WHERE amenity IS NOT NULL\n OR shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR tourism IS NOT NULL\n OR \"natural\" IS NOT NULL\n OR man_made IN ('lighthouse', 'windmill', 'pier', 'breakwater', 'groyne')\n OR place = 'island'\n OR place = 'islet'\n OR military IS NOT NULL\n OR historic IN ('memorial', 'archaeological_site')\n OR power IS NOT NULL\n OR aeroway IS NOT NULL\n OR highway IN ('services', 'rest_area')\n OR boundary = 'national_park'\n OR waterway = 'dam'\n ORDER BY way_area desc\n) AS text_poly", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1708,15 +1734,38 @@ "advanced": {} }, { - "name": "text", + "name": "text-line", + "srs-name": "900913", + "geometry": "linestring", + "class": "text", + "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 way, NULL as way_pixels, COALESCE('man_made_' || man_made, 'waterway_' || waterway) AS feature, access, NULL as ele, name, ref, 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')\n OR waterway IN ('dam', 'weir', 'lock_gate')\n) AS text_line", + "geometry_field": "way", + "type": "postgis", + "key_field": "", + "dbname": "gis" + }, + "extent": [ + -180, + -85.05112877980659, + 180, + 85.05112877980659 + ], + "id": "text-line", + "advanced": {} + }, + { + "name": "text-point", "srs-name": "900913", "geometry": "point", "class": "text", - "id": "text", + "id": "text-point", "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(\n 'aeroway_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'waterway_' || waterway,\n 'historic_' || historic,\n 'highway_' || highway,\n 'power_' || power,\n 'boundary_' || boundary\n ) AS feature,\n access,\n (CASE WHEN \"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN CASE WHEN ele IS NOT NULL THEN CASE WHEN name IS NOT NULL THEN CONCAT(name, E'\\n', ele) ELSE ele END ELSE name END ELSE name END) AS name,\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 WHERE amenity IS NOT NULL\n OR shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR tourism IS NOT NULL\n OR \"natural\" IS NOT NULL\n OR man_made IN ('lighthouse', 'windmill')\n OR place = 'island'\n OR place = 'islet'\n OR military IS NOT NULL\n OR aeroway IS NOT NULL\n OR waterway = 'lock'\n OR historic IN ('memorial', 'archaeological_site')\n OR power IS NOT NULL\n OR highway IN ('bus_stop', 'services', 'rest_area')\n OR boundary = 'national_park'\n ) AS text", + "table": "(SELECT\n way,\n NULL as way_pixels,\n COALESCE(\n 'aeroway_' || aeroway,\n 'shop_' || CASE WHEN shop IN ('supermarket', 'bakery', 'butcher', 'clothes', 'fashion', 'convenience', 'department_store', 'doityourself', 'florist', 'hairdresser', 'car', 'car_repair', 'bicycle', 'mall') THEN shop WHEN NOT shop IS NULL THEN 'other' ELSE NULL END,\n 'amenity_' || amenity,\n 'leisure_' || leisure,\n 'landuse_' || landuse,\n 'man_made_' || man_made,\n 'natural_' || \"natural\",\n 'place_' || place,\n 'tourism_' || tourism,\n 'military_' || military,\n 'waterway_' || waterway,\n 'historic_' || historic,\n 'highway_' || highway,\n 'power_' || power,\n 'boundary_' || boundary\n ) AS feature,\n access,\n (CASE WHEN \"natural\" IN ('peak', 'volcano', 'saddle') OR tourism = 'alpine_hut' OR amenity = 'shelter' THEN CASE WHEN ele IS NOT NULL THEN CASE WHEN name IS NOT NULL THEN CONCAT(name, E'\\n', ele) ELSE ele END ELSE name END ELSE name END) AS name,\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 WHERE amenity IS NOT NULL\n OR shop IN ('accessories', 'alcohol', 'antique', 'antiques', 'appliance', 'art', 'baby_goods', 'bag', 'bags', 'bakery', 'bathroom_furnishing', 'beauty', 'bed', 'betting', 'beverages', 'bicycle', 'boat', 'bookmaker', 'books', 'boutique', 'builder', 'building_materials', 'butcher', 'camera', 'car', 'car_parts', 'car_repair', 'car_service', 'carpet', 'charity', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'communication', 'computer', 'confectionery', 'convenience', 'copyshop', 'cosmetics', 'craft', 'curtain', 'dairy', 'deli', 'delicatessen', 'department_store', 'discount', 'dive', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electrical', 'electronics', 'energy', 'erotic', 'estate_agent', 'fabric', 'farm', 'fashion', 'fish', 'fishing', 'fishmonger', 'flooring', 'florist', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'furniture', 'gallery', 'gambling', 'games', 'garden_centre', 'gas', 'general', 'gift', 'glaziery', 'greengrocer', 'grocery', 'hairdresser', 'hardware', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hifi', 'hobby', 'household', 'houseware', 'hunting', 'ice_cream', 'insurance', 'interior_decoration', 'jewellery', 'jewelry', 'kiosk', 'kitchen', 'laundry', 'leather', 'lighting', 'locksmith', 'lottery', 'mall', 'market', 'massage', 'medical', 'medical_supply', 'mobile_phone', 'money_lender', 'motorcycle', 'motorcycle_repair', 'music', 'musical_instrument', 'newsagent', 'office_supplies', 'optician', 'organic', 'outdoor', 'paint', 'pastry', 'pawnbroker', 'perfumery', 'pet', 'pets', 'pharmacy', 'phone', 'photo', 'photo_studio', 'photography', 'pottery', 'printing', 'radiotechnics', 'real_estate', 'religion', 'rental', 'salon', 'scuba_diving', 'seafood', 'second_hand', 'sewing', 'shoe_repair', 'shoes', 'shopping_centre', 'solarium', 'souvenir', 'sports', 'stationery', 'supermarket', 'tailor', 'tanning', 'tattoo', 'tea', 'ticket', 'tiles', 'tobacco', 'toys', 'trade', 'travel_agency', 'tyres', 'vacuum_cleaner', 'variety_store', 'video', 'video_games', 'watches', 'wholesale', 'wine', 'winery', 'yes')\n OR leisure IS NOT NULL\n OR landuse IS NOT NULL\n OR tourism IS NOT NULL\n OR \"natural\" IS NOT NULL\n OR man_made IN ('lighthouse', 'windmill')\n OR place = 'island'\n OR place = 'islet'\n OR military IS NOT NULL\n OR aeroway IS NOT NULL\n OR waterway IN ('dam', 'weir', 'lock_gate')\n OR historic IN ('memorial', 'archaeological_site')\n OR power IS NOT NULL\n OR highway IN ('bus_stop', 'services', 'rest_area')\n OR boundary = 'national_park'\n ) AS text", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -1846,7 +1895,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 way, waterway, lock, name, intermittent, CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel\n FROM planet_osm_line\n WHERE waterway IN ('weir', 'river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND (tunnel IS NULL or tunnel != 'culvert')\n ORDER BY z_order\n ) AS water_lines_text", + "table": " (SELECT way, waterway, lock, name, intermittent, CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel\n FROM planet_osm_line\n WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi')\n AND (tunnel IS NULL or tunnel != 'culvert')\n ORDER BY z_order\n ) AS water_lines_text", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index a20b279fcb..ed65ff3b09 100644 --- a/project.yaml +++ b/project.yaml @@ -272,28 +272,43 @@ Layer: CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel, 'no' AS bridge FROM planet_osm_line - WHERE waterway IN ('weir', 'river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') + WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')) ORDER BY z_order ) AS water_lines properties: minzoom: 12 advanced: {} - - id: "dam" - name: "dam" + - id: "water-barriers-line" + name: "water-barriers-line" class: "" geometry: "linestring" <<: *extents Datasource: <<: *osm2pgsql table: |- - (SELECT way, name - FROM planet_osm_line - WHERE waterway = 'dam' - ) AS dam + (SELECT way, waterway, name + FROM planet_osm_line + WHERE waterway IN ('dam', 'weir', 'lock_gate') + ) AS water_barriers_line + advanced: {} properties: minzoom: 13 + - id: "water-barriers-poly" + name: "water-barriers-poly" + class: "" + geometry: "polygon" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT way, waterway, name + FROM planet_osm_polygon + WHERE waterway IN ('dam', 'weir', 'lock_gate') + ) AS water_barriers_poly advanced: {} + properties: + minzoom: 13 - id: "marinas-area" name: "marinas-area" class: "" @@ -310,8 +325,8 @@ Layer: properties: minzoom: 14 advanced: {} - - id: "piers-area" - name: "piers-area" + - id: "piers-poly" + name: "piers-poly" class: "" geometry: "polygon" <<: *extents @@ -322,12 +337,12 @@ Layer: way, man_made FROM planet_osm_polygon WHERE man_made IN ('pier', 'breakwater', 'groyne') - ) AS piers_area + ) AS piers_poly properties: minzoom: 12 advanced: {} - - id: "piers" - name: "piers" + - id: "piers-line" + name: "piers-line" class: "" geometry: "linestring" <<: *extents @@ -338,23 +353,23 @@ Layer: way, man_made FROM planet_osm_line WHERE man_made IN ('pier', 'breakwater', 'groyne') - ) AS piers + ) AS piers_line properties: minzoom: 12 advanced: {} - - id: "locks" - name: "locks" + - id: "water-barriers-point" + name: "water-barriers-point" class: "" geometry: "point" <<: *extents Datasource: <<: *osm2pgsql table: |- - (SELECT - way, waterway - FROM planet_osm_point - WHERE waterway = 'lock_gate' - ) AS locks + (SELECT + way, waterway + FROM planet_osm_point + WHERE waterway IN ('dam', 'weir', 'lock_gate') + ) AS water_barriers_points properties: minzoom: 17 advanced: {} @@ -1375,9 +1390,7 @@ Layer: 'place_' || place, 'tourism_' || tourism, 'military_' || military, - 'waterway_' || waterway, 'historic_' || historic, - 'lock_' || lock, 'highway_'|| highway, 'power_' || power ) AS feature, @@ -1423,9 +1436,7 @@ Layer: 'place_' || place, 'tourism_' || tourism, 'military_' || military, - 'waterway_' || waterway, 'historic_' || historic, - 'lock_' || lock, 'highway_' || highway, 'power_' || power ) AS feature, @@ -1441,8 +1452,6 @@ Layer: OR highway IN ('bus_stop', 'traffic_signals', 'ford') OR man_made IN ('mast', 'water_tower', 'lighthouse', 'power_wind', 'windmill') OR historic IN ('memorial', 'archaeological_site') - OR waterway = 'lock' - OR lock = 'yes' OR leisure IN ('water_park', 'playground', 'slipway', 'picnic_table', 'golf_course', 'miniature_golf') OR aeroway IN ('aerodrome', 'helipad') OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'tree', 'cave_entrance') @@ -1660,7 +1669,7 @@ Layer: OR landuse IS NOT NULL OR tourism IS NOT NULL OR "natural" IS NOT NULL - OR man_made IN ('lighthouse', 'windmill') + OR man_made IN ('lighthouse', 'windmill', 'pier', 'breakwater', 'groyne') OR place = 'island' OR place = 'islet' OR military IS NOT NULL @@ -1669,13 +1678,29 @@ Layer: OR aeroway IS NOT NULL OR highway IN ('services', 'rest_area') OR boundary = 'national_park' + OR waterway = 'dam' ORDER BY way_area desc ) AS text_poly properties: minzoom: 10 advanced: {} - - id: "text" - name: "text" + - id: "text-line" + name: "text-line" + class: "text" + geometry: "linestring" + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT way, NULL as way_pixels, COALESCE('man_made_' || man_made, 'waterway_' || waterway) AS feature, access, NULL as ele, name, ref, 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') + OR waterway IN ('dam', 'weir', 'lock_gate') + ) AS text_line + advanced: {} + - id: "text-point" + name: "text-point" class: "text" geometry: "point" <<: *extents @@ -1719,7 +1744,7 @@ Layer: OR place = 'islet' OR military IS NOT NULL OR aeroway IS NOT NULL - OR waterway = 'lock' + OR waterway IN ('dam', 'weir', 'lock_gate') OR historic IN ('memorial', 'archaeological_site') OR power IS NOT NULL OR highway IN ('bus_stop', 'services', 'rest_area') @@ -1823,7 +1848,7 @@ Layer: table: |2- (SELECT way, waterway, lock, name, intermittent, CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel FROM planet_osm_line - WHERE waterway IN ('weir', 'river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') + WHERE waterway IN ('river', 'canal', 'derelict_canal', 'stream', 'drain', 'ditch', 'wadi') AND (tunnel IS NULL or tunnel != 'culvert') ORDER BY z_order ) AS water_lines_text diff --git a/water-features.mss b/water-features.mss index 65dca74b88..cabf9bfdac 100644 --- a/water-features.mss +++ b/water-features.mss @@ -1,16 +1,93 @@ -#dam { - [zoom >= 13] { - line-width: 2; - line-color: #444; - line-join: round; - line-cap: round; +@breakwater-color: #aaa; /* Also for groyne */ +@dam: #adadad; +@dam-line: #444444; +@weir-line: #aaa; +@lock-gate: #aaa; +@lock-gate-line: #aaa; + +#water-barriers-point, #water-barriers-line, #water-barriers-poly { + [waterway = 'dam'] { + #water-barriers-poly[zoom >= 13] { + line-width: 2; + line-color: @dam-line; + line-join: round; + line-cap: round; + polygon-fill: @dam; + } + #water-barriers-line[zoom >= 13] { + line-width: 2; + line-color: @dam-line; + line-join: round; + line-cap: round; + } + #water-barriers-point[zoom >= 17] { + marker-fill: @dam; + marker-line-color: @dam-line; + marker-line-width: 1; + marker-width: 8; + marker-height: 8; + marker-allow-overlap: true; + marker-ignore-placement: true; + } } - [zoom >= 15] { - text-name: "[name]"; - text-halo-radius: 1; - text-fill: #222; - text-size: 8; - text-face-name: @book-fonts; + + [waterway = 'weir'] { + #water-barriers-line[zoom >= 13] { + line-color: @weir-line; + line-width: 2; + line-dasharray: 2,2; + } + #water-barriers-point[zoom >= 17] { + marker-fill: @water-color; + marker-line-color: @weir-line; + marker-line-width: 1; + marker-width: 8; + marker-height: 8; + marker-allow-overlap: true; + marker-ignore-placement: true; + } + } + + [waterway = 'lock_gate'] { + #water-barriers-line[zoom >= 13] { + line-color: @lock-gate-line; + line-width: 2; + } + #water-barriers-point[zoom >= 17] { + marker-fill: @lock-gate; + marker-line-width: 0; + marker-width: 8; + marker-height: 8; + marker-allow-overlap: true; + marker-ignore-placement: true; + } + } +} + +#piers-poly, #piers-line { + [man_made = 'pier'][zoom >= 12] { + #piers-poly { + polygon-fill: @land-color; + } + #piers-line { + line-width: 1.5; + line-color: @land-color; + [zoom >= 13] { line-width: 3; } + [zoom >= 16] { line-width: 7; } + } + } + + [man_made = 'breakwater'][zoom >= 12], + [man_made = 'groyne'][zoom >= 12] { + #piers-poly { + polygon-fill: @breakwater-color; + } + #piers-line { + line-width: 1; + line-color: @breakwater-color; + [zoom >= 13] { line-width: 2; } + [zoom >= 16] { line-width: 4; } + } } } @@ -37,38 +114,50 @@ } } -#piers-area { - [zoom >= 12] { - polygon-fill: @land-color; - } -} - -#piers { - [man_made = 'breakwater'], - [man_made = 'groyne'] { - [zoom >= 12] { - line-width: 1; - line-color: #aaa; - } - [zoom >= 13] { - line-width: 2; - } - [zoom >= 16] { - line-width: 4; +.text { + [feature = 'waterway_dam'], + [feature = 'waterway_weir'], + [feature = 'waterway_lock_gate'] { + #text-poly[zoom >= 15], + #text-line[zoom >= 15], + #text-point[zoom >= 17] { + text-name: "[name]"; + text-halo-radius: 1; + text-fill: #222; + text-size: 10; + text-face-name: @book-fonts; + #text-poly { + text-placement: interior; + } + #text-line { + text-placement: line; + text-dy: 8; + text-spacing: 400; + } + #text-point { + text-placement: point; + text-dy: 8; + } } } - [man_made = 'pier'][zoom >= 12] { - line-width: 1.5; - line-color: @land-color; - [zoom >= 13] { line-width: 3; } - [zoom >= 16] { line-width: 7; } - } -} -#locks { - [waterway = 'lock_gate'][zoom >= 17] { - marker-fill: #969494; - marker-width: 9; - marker-line-width: 0; + [feature = 'man_made_breakwater'][zoom >= 15], + [feature = 'man_made_groyne'][zoom >= 15], + [feature = 'man_made_pier'][zoom >= 15] { + #text-poly, + #text-line { + text-name: "[name]"; + text-halo-radius: 1; + text-fill: #222; + text-size: 10; + text-face-name: @book-fonts; + #text-poly { + text-placement: interior; + } + #text-line { + text-placement: line; + text-spacing: 400; + } + } } } diff --git a/water.mss b/water.mss index a421bf59dc..7a54960029 100644 --- a/water.mss +++ b/water.mss @@ -101,13 +101,6 @@ } .water-lines { - [waterway = 'weir'][zoom >= 15] { - line-color: #aaa; - line-width: 2; - line-join: round; - line-cap: round; - } - [waterway = 'canal'][zoom >= 12], [waterway = 'river'][zoom >= 12], [waterway = 'wadi'][zoom >= 13] { @@ -215,80 +208,89 @@ } #water-lines-text { - [waterway = 'river'][zoom >= 13] { - text-name: "[name]"; - text-face-name: @oblique-fonts; - text-placement: line; - text-fill: @water-text; - text-spacing: 400; - text-size: 10; - text-halo-radius: 1; - text-halo-fill: rgba(255,255,255,0.6); - [zoom >= 14] { text-size: 12; } - [int_tunnel = 'yes'] { text-min-distance: 200; } - } - - [waterway = 'canal'][zoom >= 13][zoom < 14] { + [lock = 'yes'][zoom >= 17] { text-name: "[name]"; text-face-name: @oblique-fonts; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); text-size: 10; - text-placement: line; text-fill: @water-text; + text-placement: point; + text-wrap-width: 20; } - [waterway = 'stream'][zoom >= 15] { - text-name: "[name]"; - text-size: 10; - text-face-name: @oblique-fonts; - text-fill: @water-text; - text-halo-radius: 1; - text-halo-fill: rgba(255,255,255,0.6); - text-spacing: 600; - text-placement: line; - text-dy: 8; - } + [lock != 'yes'] { + [waterway = 'river'][zoom >= 13] { + text-name: "[name]"; + text-face-name: @oblique-fonts; + text-placement: line; + text-fill: @water-text; + text-spacing: 400; + text-size: 10; + text-halo-radius: 1; + text-halo-fill: rgba(255,255,255,0.6); + [zoom >= 14] { text-size: 12; } + [int_tunnel = 'yes'] { text-min-distance: 200; } + } - [waterway = 'drain'], - [waterway = 'ditch'] { - [zoom >= 15] { + [waterway = 'canal'][zoom >= 13][zoom < 14] { text-name: "[name]"; text-face-name: @oblique-fonts; + text-halo-radius: 1; + text-halo-fill: rgba(255,255,255,0.6); text-size: 10; - text-fill: @water-text; - text-spacing: 600; text-placement: line; + text-fill: @water-text; + } + + [waterway = 'stream'][zoom >= 15] { + text-name: "[name]"; + text-size: 10; + text-face-name: @oblique-fonts; + text-fill: @water-text; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); + text-spacing: 600; + text-placement: line; + text-dy: 8; } - } - [waterway = 'canal'][zoom >= 14] { - text-name: "[name]"; - text-size: 10; - text-fill: @water-text; - text-placement: line; - text-face-name: @oblique-fonts; - text-halo-radius: 1; - text-halo-fill: rgba(255,255,255,0.6); - [lock = 'yes'][zoom >= 17] { - text-placement: point; - text-wrap-width: 20; + [waterway = 'drain'], + [waterway = 'ditch'] { + [zoom >= 15] { + text-name: "[name]"; + text-face-name: @oblique-fonts; + text-size: 10; + text-fill: @water-text; + text-spacing: 600; + text-placement: line; + text-halo-radius: 1; + text-halo-fill: rgba(255,255,255,0.6); + } } - } - [waterway = 'derelict_canal'][zoom >= 13] { - text-name: "[name]"; - text-size: 10; - text-fill: #80d1ae; - text-face-name: @oblique-fonts; - text-placement: line; - text-spacing: 600; - text-halo-radius: 1; - text-halo-fill: rgba(255,255,255,0.6); - [zoom >= 14] { - text-size: 12; + [waterway = 'canal'][zoom >= 14] { + text-name: "[name]"; + text-size: 10; + text-fill: @water-text; + text-placement: line; + text-face-name: @oblique-fonts; + text-halo-radius: 1; + text-halo-fill: rgba(255,255,255,0.6); + } + + [waterway = 'derelict_canal'][zoom >= 13] { + text-name: "[name]"; + text-size: 10; + text-fill: #80d1ae; + text-face-name: @oblique-fonts; + text-placement: line; + text-spacing: 600; + text-halo-radius: 1; + text-halo-fill: rgba(255,255,255,0.6); + [zoom >= 14] { + text-size: 12; + } } } }