Skip to content

Commit

Permalink
SQL style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brainwad committed Nov 29, 2020
1 parent a31730a commit 655de63
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,14 @@ Layer:
END AS oneway,
CASE
WHEN tags->'cycleway:left' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:left:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:left:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:left' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:left:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:left:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:left' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway:both' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:both' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:both:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:both:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:both' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'cycleway' IN ('lane', 'opposite_lane') THEN 'lane'
Expand All @@ -514,14 +514,14 @@ Layer:
END AS cycleway_left_render,
CASE
WHEN tags->'cycleway:right' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:right:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:right:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:right' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:right:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:right:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:right' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway:both' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:both' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:both:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:both:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:both' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'cycleway' IN ('lane', 'opposite_lane') THEN 'lane'
Expand Down Expand Up @@ -683,14 +683,14 @@ Layer:
END AS oneway,
CASE
WHEN tags->'cycleway:left' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:left:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:left:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:left' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:left:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:left:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:left' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway:both' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:both' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:both:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:both:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:both' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'cycleway' IN ('lane', 'opposite_lane') THEN 'lane'
Expand All @@ -699,14 +699,14 @@ Layer:
END AS cycleway_left_render,
CASE
WHEN tags->'cycleway:right' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:right:bicycle' <> 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:right:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:right' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:right:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:right:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:right' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway:both' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:both:bicycle' <> 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:both' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:both:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:both:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:both' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'cycleway' IN ('lane', 'opposite_lane') THEN 'lane'
Expand Down Expand Up @@ -954,14 +954,14 @@ Layer:
END AS oneway,
CASE
WHEN tags->'cycleway:left' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:left:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:left:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:left' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:left:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:left:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:left' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway:both' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:both' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:both:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:both:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:both' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'cycleway' IN ('lane', 'opposite_lane') THEN 'lane'
Expand All @@ -970,14 +970,14 @@ Layer:
END AS cycleway_left_render,
CASE
WHEN tags->'cycleway:right' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:right:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:right:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:right' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:right:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:right:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:right' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway:both' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' and tags->'sidewalk:left:segregated' = 'yes' then 'track'
WHEN tags->'sidewalk:both:bicycle' != 'no' AND tags->'sidewalk:left:segregated' = 'yes' THEN 'track'
WHEN tags->'cycleway:both' IN ('lane', 'opposite_lane') THEN 'lane'
WHEN tags->'sidewalk:both:bicycle' = 'yes' then 'sidewalk'
WHEN tags->'sidewalk:both:bicycle' = 'yes' THEN 'sidewalk'
WHEN tags->'cycleway:both' IN ('share_busway', 'opposite_share_busway', 'shoulder', 'shared_lane') THEN 'busway'
WHEN tags->'cycleway' IN ('track', 'opposite_track') THEN 'track'
WHEN tags->'cycleway' IN ('lane', 'opposite_lane') THEN 'lane'
Expand Down Expand Up @@ -1732,7 +1732,7 @@ Layer:
'shop_' || CASE WHEN shop IN ('bicycle', 'bakery', 'beverage', 'convenience', 'convenience;gas', 'gas', 'greengrocer', 'supermarket', 'pastry', 'sports') THEN shop ELSE NULL END,
'amenity_' || CASE WHEN amenity IN ('atm', 'bank', 'bar', 'bench', 'bicycle_rental', 'bicycle_parking', 'bicycle_repair_station', 'biergarten', 'cafe', 'car_wash', 'compressed_air', 'drinking_water', 'fast_food', 'ferry_terminal', 'food_court', 'fountain', 'fuel', 'hospital', 'ice_cream', 'internet_cafe', 'pharmacy', 'place_of_worship', 'police', 'post_office', 'post_box', 'pub', 'public_bath', 'restaurant', 'shelter', 'shower', 'toilets', 'water_point', 'cinema', 'theatre', 'bureau_de_change', 'casino', 'library', 'motorcycle_parking', 'charging_station', 'vending_machine') THEN amenity ELSE NULL END,
'shop_' || CASE WHEN tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' THEN 'bicycle' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL THEN tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
'leisure_' || CASE WHEN leisure='picnic_table' THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'water_tap', 'monitoring_station') THEN man_made ELSE NULL END,
Expand Down Expand Up @@ -1869,7 +1869,7 @@ Layer:
'shop_' || CASE WHEN shop IN ('bicycle', 'bakery', 'beverage', 'convenience', 'convenience;gas', 'gas', 'greengrocer', 'supermarket', 'pastry', 'sports') THEN shop ELSE NULL END,
'amenity_' || CASE WHEN amenity IN ('atm', 'bank', 'bar', 'bench', 'bicycle_rental', 'bicycle_parking', 'bicycle_repair_station', 'biergarten', 'cafe', 'car_wash', 'compressed_air', 'drinking_water', 'fast_food', 'ferry_terminal', 'food_court', 'fountain', 'fuel', 'hospital', 'ice_cream', 'internet_cafe', 'pharmacy', 'place_of_worship', 'police', 'post_office', 'post_box', 'pub', 'public_bath', 'restaurant', 'shelter', 'shower', 'toilets', 'water_point', 'cinema', 'theatre', 'bureau_de_change', 'casino', 'library', 'motorcycle_parking', 'charging_station', 'vending_machine') THEN amenity ELSE NULL END,
'shop_' || CASE WHEN tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' THEN 'bicycle' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL THEN tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
'leisure_' || CASE WHEN leisure='picnic_table' THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'water_tap', 'monitoring_station') THEN man_made ELSE NULL END,
Expand Down Expand Up @@ -2113,7 +2113,7 @@ Layer:
'shop_' || CASE WHEN shop IN ('bicycle', 'bakery', 'beverage', 'convenience', 'convenience;gas', 'gas', 'greengrocer', 'supermarket', 'pastry', 'sports') THEN shop ELSE NULL END,
'amenity_' || CASE WHEN amenity IN ('atm', 'bank', 'bar', 'bench', 'bicycle_rental', 'bicycle_parking', 'bicycle_repair_station', 'biergarten', 'cafe', 'car_wash', 'compressed_air', 'drinking_water', 'fast_food', 'ferry_terminal', 'food_court', 'fountain', 'fuel', 'hospital', 'ice_cream', 'internet_cafe', 'pharmacy', 'place_of_worship', 'police', 'post_office', 'post_box', 'pub', 'public_bath', 'restaurant', 'shelter', 'shower', 'toilets', 'water_point', 'cinema', 'theatre', 'bureau_de_change', 'casino', 'library', 'motorcycle_parking', 'charging_station', 'vending_machine') THEN amenity ELSE NULL END,
'shop_' || CASE WHEN tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' THEN 'bicycle' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL THEN tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
'leisure_' || CASE WHEN leisure='picnic_table' THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'water_tap', 'monitoring_station') THEN man_made ELSE NULL END,
Expand Down Expand Up @@ -2266,7 +2266,7 @@ Layer:
'shop_' || CASE WHEN shop IN ('bicycle', 'bakery', 'beverage', 'convenience', 'convenience;gas', 'gas', 'greengrocer', 'supermarket', 'pastry', 'sports') THEN shop ELSE NULL END,
'amenity_' || CASE WHEN amenity IN ('atm', 'bank', 'bar', 'bench', 'bicycle_rental', 'bicycle_parking', 'bicycle_repair_station', 'biergarten', 'cafe', 'car_wash', 'compressed_air', 'drinking_water', 'fast_food', 'ferry_terminal', 'food_court', 'fountain', 'fuel', 'hospital', 'ice_cream', 'internet_cafe', 'pharmacy', 'place_of_worship', 'police', 'post_office', 'post_box', 'pub', 'public_bath', 'restaurant', 'shelter', 'shower', 'toilets', 'water_point', 'cinema', 'theatre', 'bureau_de_change', 'casino', 'library', 'motorcycle_parking', 'charging_station', 'vending_machine') THEN amenity ELSE NULL END,
'shop_' || CASE WHEN tags->'service:bicycle:retail'='yes' OR tags->'service:bicycle:repair'='yes' OR tags->'service:bicycle:rental'='yes' THEN 'bicycle' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL then tags->'emergency' ELSE NULL END,
'emergency_' || CASE WHEN tags->'emergency' IS NOT NULL THEN tags->'emergency' ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('clinic', 'hospital') THEN tags->'healthcare' ELSE NULL END,
'leisure_' || CASE WHEN leisure='picnic_table' THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'water_tap', 'monitoring_station') THEN man_made ELSE NULL END,
Expand Down

0 comments on commit 655de63

Please sign in to comment.