Skip to content

Commit

Permalink
Fixing database compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Jun 20, 2018
1 parent e870ecf commit 9f9e01a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ Layer:
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table',
'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL)) THEN man_made ELSE NULL END,
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
Expand All @@ -1623,7 +1623,7 @@ Layer:
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
CASE
WHEN (man_made IN ('mast', 'tower', 'chimney') AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL)) THEN
WHEN (man_made IN ('mast', 'tower', 'chimney') AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN
CASE
WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC
ELSE NULL
Expand Down Expand Up @@ -1662,7 +1662,7 @@ Layer:
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre',
'fitness_station', 'firepit', 'sauna', 'beach_resort')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL))
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IN ('spring')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
OR tags->'memorial' IN ('plaque')
Expand Down Expand Up @@ -1722,7 +1722,7 @@ Layer:
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park', 'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL)) THEN man_made ELSE NULL END,
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END,
'waterway_' || CASE WHEN "waterway" IN ('waterfall') THEN waterway ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
Expand Down Expand Up @@ -1755,7 +1755,7 @@ Layer:
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
CASE
WHEN (man_made IN ('mast', 'tower', 'chimney') AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL))
WHEN (man_made IN ('mast', 'tower', 'chimney') AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR waterway IN ('waterfall') THEN
CASE
WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC
Expand Down Expand Up @@ -1796,7 +1796,7 @@ Layer:
'dog_park', 'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort')
OR barrier IN ('toll_booth')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL))
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')
OR waterway IN ('waterfall')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle', 'manor', 'city_gate')
Expand Down Expand Up @@ -2194,7 +2194,7 @@ Layer:
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery', 'religious') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL)) THEN man_made ELSE NULL END,
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
Expand Down Expand Up @@ -2247,7 +2247,7 @@ Layer:
OR leisure IS NOT NULL
OR landuse IS NOT NULL
OR (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL))
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area', 'bunker')
Expand Down Expand Up @@ -2361,7 +2361,7 @@ Layer:
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'obelisk', 'works', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL)) THEN man_made ELSE NULL END,
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring',
'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree')
THEN "natural" ELSE NULL END,
Expand Down Expand Up @@ -2425,7 +2425,7 @@ Layer:
'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military', 'plant_nursery')
OR (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'cross', 'obelisk', 'works', 'communications_tower', 'chimney')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR tags->'location' IS NULL))
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IS NOT NULL
OR waterway IN ('waterfall')
OR place IN ('island', 'islet')
Expand Down

0 comments on commit 9f9e01a

Please sign in to comment.