From db76c08f0b86ea2a9e12f99b94655144f6c9c478 Mon Sep 17 00:00:00 2001 From: math1985 Date: Fri, 30 Jan 2015 22:15:20 +0000 Subject: [PATCH] Correct lock name rendering * Remove unreferenced lock code from amenity-points.mss * Don't render waterway=lock_gate names * Don't render lock=yes name --- amenity-points.mss | 11 ----------- project.mml | 6 +++--- project.yaml | 6 +++--- water-features.mss | 3 +-- water.mss | 11 ----------- 5 files changed, 7 insertions(+), 30 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index b20d9a7482..9593ecc730 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -195,17 +195,6 @@ marker-clip: false; } - [feature = 'waterway_lock'], - [feature = 'lock_yes'] { - [zoom >= 15] { - marker-fill: #969494; - marker-width: 9; - marker-line-width: 0; - marker-placement: interior; - marker-clip: false; - } - } - [feature = 'man_made_mast'][zoom >= 17] { marker-file: url('symbols/communications.16.svg'); marker-fill: #555; diff --git a/project.mml b/project.mml index 871c96ca63..e4a5cb1e93 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 ('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, 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": "", @@ -1741,7 +1741,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, 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", + "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')\n) AS text_line", "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(\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", + "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')\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": "", diff --git a/project.yaml b/project.yaml index ed65ff3b09..6b7ce24244 100644 --- a/project.yaml +++ b/project.yaml @@ -268,7 +268,7 @@ Layer: <<: *osm2pgsql table: |- (SELECT - way, waterway, lock, name, intermittent, + way, waterway, name, intermittent, CASE WHEN tunnel IN ('yes', 'culvert') THEN 'yes' ELSE 'no' END AS int_tunnel, 'no' AS bridge FROM planet_osm_line @@ -1696,7 +1696,7 @@ Layer: 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') + OR waterway IN ('dam', 'weir') ) AS text_line advanced: {} - id: "text-point" @@ -1744,7 +1744,7 @@ Layer: OR place = 'islet' OR military IS NOT NULL OR aeroway IS NOT NULL - OR waterway IN ('dam', 'weir', 'lock_gate') + OR waterway IN ('dam', 'weir') OR historic IN ('memorial', 'archaeological_site') OR power IS NOT NULL OR highway IN ('bus_stop', 'services', 'rest_area') diff --git a/water-features.mss b/water-features.mss index cabf9bfdac..0a79fcd522 100644 --- a/water-features.mss +++ b/water-features.mss @@ -116,8 +116,7 @@ .text { [feature = 'waterway_dam'], - [feature = 'waterway_weir'], - [feature = 'waterway_lock_gate'] { + [feature = 'waterway_weir'] { #text-poly[zoom >= 15], #text-line[zoom >= 15], #text-point[zoom >= 17] { diff --git a/water.mss b/water.mss index 7a54960029..44b4690b76 100644 --- a/water.mss +++ b/water.mss @@ -208,17 +208,6 @@ } #water-lines-text { - [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-fill: @water-text; - text-placement: point; - text-wrap-width: 20; - } - [lock != 'yes'] { [waterway = 'river'][zoom >= 13] { text-name: "[name]";