Skip to content

Commit

Permalink
Update land_use.sql
Browse files Browse the repository at this point in the history
adding level to uNION

Need to be ints
  • Loading branch information
jenningsanderson authored and vcschapp committed May 29, 2024
1 parent 93cf051 commit 3304d57
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion task-force-docs/base/infrastructure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ SELECT
tags['surface'] AS surface,

-- Overture's concept of `layer` is called level
tags['layer'] AS level,
TRY_CAST(tags['layer'] AS int) AS level,

-- Wikidata is a top-level property in the OSM Container
tags['wikidata'] as wikidata,
Expand Down
3 changes: 2 additions & 1 deletion task-force-docs/base/land.sql
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ SELECT
tags['wikidata'] as wikidata,

-- Overture's concept of `layer` is called level
tags['layer'] AS level,
TRY_CAST(tags['layer'] AS int) AS level,

-- Elevation as integer (meters above sea level)
TRY_CAST(tags['ele'] AS integer) AS elevation,
Expand Down Expand Up @@ -307,6 +307,7 @@ SELECT
)
) ] as sources,
NULL AS wikidata,
NULL AS level,
NULL AS elevation,
wkt AS wkt_geometry
FROM {daylight_earth_table}
Expand Down
3 changes: 2 additions & 1 deletion task-force-docs/base/land_use.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ SELECT
sources,
wikidata,
surface,
level,
elevation,
wkt_geometry
FROM (
Expand Down Expand Up @@ -273,7 +274,7 @@ FROM (
) ] AS sources,

-- Overture's concept of `layer` is called level
tags['layer'] AS level,
TRY_CAST(tags['layer'] AS int) AS level,

-- Wikidata is a top-level property in the OSM Container
tags['wikidata'] as wikidata,
Expand Down
3 changes: 2 additions & 1 deletion task-force-docs/base/water.sql
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ SELECT
tags['wikidata'] as wikidata,

-- Overture's concept of `layer` is called level
tags['layer'] AS level,
TRY_CAST(tags['layer'] AS int) AS level,

-- Elevation is common on some ponds / lakes.
TRY_CAST(tags['ele'] AS integer) AS elevation,
Expand Down Expand Up @@ -324,6 +324,7 @@ SELECT
) ] as sources,
-- Wikidata is a top-level property in the OSM Container
NULL as wikidata,
0 as level, -- it's the ocean, does it go lower?
-- Other type=water top-level attributes
0 AS elevation,
TRUE AS is_salt,
Expand Down

0 comments on commit 3304d57

Please sign in to comment.