Skip to content

Commit

Permalink
numeric height fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Mar 1, 2018
1 parent 7f925fd commit f295882
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,14 @@ Layer:
religion,
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
tags->'height' as height,
CASE
WHEN man_made IN ('mast', 'tower') THEN
CASE
WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC
ELSE NULL
END
ELSE NULL
END AS height,
tags->'power_source' as power_source,
tags->'icao' as icao,
tags->'iata' as iata,
Expand Down Expand Up @@ -1562,7 +1569,14 @@ Layer:
religion,
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
tags->'height' as height,
CASE
WHEN man_made IN ('mast', 'tower') THEN
CASE
WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC
ELSE NULL
END
ELSE NULL
END AS height,
tags->'power_source' as power_source,
tags->'icao' as icao,
tags->'iata' as iata,
Expand Down

0 comments on commit f295882

Please sign in to comment.