Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions queries/buildings-z13.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ SELECT
name,

(CASE WHEN COALESCE("building:part", building) != 'yes' THEN COALESCE("building:part", building) ELSE NULL END) AS kind,
building,
"building:part" AS building_part,


-- strip commas from heights (TODO: may need to strip other characters and/or do unit conversions)
TO_NUMBER(REPLACE(height, ',', '.'), '999999D99S')::float AS height,
TO_NUMBER(REPLACE(min_height, ',', '.'), '999999D99S')::float AS min_height,
Expand Down
4 changes: 1 addition & 3 deletions queries/buildings-z14.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ SELECT
name,

(CASE WHEN COALESCE("building:part", building) != 'yes' THEN COALESCE("building:part", building) ELSE NULL END) AS kind,
building,
"building:part" AS building_part,


-- strip commas from heights (TODO: may need to strip other characters and/or do unit conversions)
TO_NUMBER(REPLACE(height, ',', '.'), '999999D99S')::float AS height,
TO_NUMBER(REPLACE(min_height, ',', '.'), '999999D99S')::float AS min_height,
Expand Down
4 changes: 1 addition & 3 deletions queries/buildings-z15.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ SELECT
name,

(CASE WHEN COALESCE("building:part", building) != 'yes' THEN COALESCE("building:part", building) ELSE NULL END) AS kind,
building,
"building:part" AS building_part,


-- strip commas from heights (TODO: may need to strip other characters and/or do unit conversions)
TO_NUMBER(REPLACE(height, ',', '.'), '999999D99S')::float AS height,
TO_NUMBER(REPLACE(min_height, ',', '.'), '999999D99S')::float AS min_height,
Expand Down
4 changes: 1 addition & 3 deletions queries/buildings-z16.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ SELECT
name,

(CASE WHEN COALESCE("building:part", building) != 'yes' THEN COALESCE("building:part", building) ELSE NULL END) AS kind,
building,
"building:part" AS building_part,


-- strip commas from heights (TODO: may need to strip other characters and/or do unit conversions)
TO_NUMBER(REPLACE(height, ',', '.'), '999999D99S')::float AS height,
TO_NUMBER(REPLACE(min_height, ',', '.'), '999999D99S')::float AS min_height,
Expand Down
4 changes: 1 addition & 3 deletions queries/buildings-z17.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ SELECT
name,

(CASE WHEN COALESCE("building:part", building) != 'yes' THEN COALESCE("building:part", building) ELSE NULL END) AS kind,
building,
"building:part" AS building_part,


-- strip commas from heights (TODO: may need to strip other characters and/or do unit conversions)
TO_NUMBER(REPLACE(height, ',', '.'), '999999D99S')::float AS height,
TO_NUMBER(REPLACE(min_height, ',', '.'), '999999D99S')::float AS min_height,
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z10.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z11.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z12.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z13.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z14.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z15.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
3 changes: 1 addition & 2 deletions queries/land-usages-z16.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",


--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z4.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM
--
-- Urban Areas
--
SELECT 'urban' AS name,
SELECT '' AS name,
ST_Area(the_geom)::bigint AS area,
'urban area' AS kind,
'naturalearthdata.com' AS source,
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z6.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM
--
-- Urban Areas
--
SELECT 'urban' AS name,
SELECT '' AS name,
ST_Area(the_geom)::bigint AS area,
'urban area' AS kind,
'naturalearthdata.com' AS source,
Expand Down
2 changes: 1 addition & 1 deletion queries/land-usages-z9.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SELECT name,
COALESCE("landuse", "leisure", "natural", "highway", "amenity") AS kind,
'openstreetmap.org' AS source,
way AS __geometry__,
"landuse", "leisure", "natural", "highway", "amenity",

--
-- Negative osm_id is synthetic, with possibly multiple geometry rows.
--
Expand Down
2 changes: 1 addition & 1 deletion queries/places-z0.pgsql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SELECT
name,
place,
COALESCE("place") AS kind,
way AS __geometry__

FROM planet_osm_point
Expand Down
2 changes: 1 addition & 1 deletion queries/places-z12.pgsql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SELECT
name,
place,
COALESCE("place") AS kind,
way AS __geometry__

FROM planet_osm_point
Expand Down
2 changes: 1 addition & 1 deletion queries/places-z3.pgsql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SELECT
name,
place,
COALESCE("place") AS kind,
way AS __geometry__

FROM planet_osm_point
Expand Down
2 changes: 1 addition & 1 deletion queries/places-z7.pgsql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SELECT
name,
place,
COALESCE("place") AS kind,
way AS __geometry__

FROM planet_osm_point
Expand Down
3 changes: 1 addition & 2 deletions queries/pois-z10.pgsql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
SELECT name,
COALESCE("aeroway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aeroway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
3 changes: 1 addition & 2 deletions queries/pois-z11.pgsql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
SELECT name,
COALESCE("aeroway", "natural") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aeroway", "natural"
osm_id AS __id__

FROM planet_osm_point

Expand Down
3 changes: 1 addition & 2 deletions queries/pois-z12.pgsql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
SELECT name,
COALESCE("aeroway", "natural", "railway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aeroway", "natural", "railway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
3 changes: 1 addition & 2 deletions queries/pois-z13.pgsql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
SELECT name,
COALESCE("aerialway", "aeroway", "natural", "railway", "tourism") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aerialway", "aeroway", "natural", "railway", "tourism"
osm_id AS __id__

FROM planet_osm_point

Expand Down
3 changes: 1 addition & 2 deletions queries/pois-z14.pgsql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
SELECT name,
COALESCE("aerialway", "aeroway", "natural", "railway", "tourism") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aerialway", "aeroway", "natural", "railway", "tourism"
osm_id AS __id__

FROM planet_osm_point

Expand Down
5 changes: 1 addition & 4 deletions queries/pois-z15.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ SELECT name,
"lock", "man_made", "natural", "power", "railway", "tourism",
"waterway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aerialway", "aeroway", "amenity", "barrier", "highway",
"lock", "man_made", "natural", "power", "railway", "tourism",
"waterway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
5 changes: 1 addition & 4 deletions queries/pois-z16.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ SELECT name,
"lock", "man_made", "natural", "power", "railway", "shop", "tourism",
"waterway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aerialway", "aeroway", "amenity", "barrier", "highway", "historic",
"lock", "man_made", "natural", "power", "railway", "shop", "tourism",
"waterway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
5 changes: 1 addition & 4 deletions queries/pois-z17.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ SELECT name,
"leisure", "lock", "man_made", "natural", "power", "railway", "shop",
"tourism", "waterway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aerialway", "aeroway", "amenity", "barrier", "highway", "historic",
"leisure", "lock", "man_made", "natural", "power", "railway", "shop",
"tourism", "waterway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
5 changes: 1 addition & 4 deletions queries/pois-z18.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ SELECT name,
"leisure", "lock", "man_made", "natural", "power", "railway", "shop",
"tourism", "waterway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aerialway", "aeroway", "amenity", "barrier", "highway", "historic",
"leisure", "lock", "man_made", "natural", "power", "railway", "shop",
"tourism", "waterway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
3 changes: 1 addition & 2 deletions queries/pois-z9.pgsql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
SELECT name,
COALESCE("aeroway") AS kind,
way AS __geometry__,
osm_id AS __id__,
"aeroway"
osm_id AS __id__

FROM planet_osm_point

Expand Down
6 changes: 1 addition & 5 deletions queries/water-areas-z0.pgsql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT name, area, kind, waterway, "natural", source, __geometry__
SELECT name, area, kind, source, __geometry__

FROM
(
Expand All @@ -8,8 +8,6 @@ FROM
SELECT '' AS name,
ST_Area(the_geom)::bigint AS area,
'ocean' AS kind,
'ocean' AS waterway,
'water' AS natural,
'naturalearthdata.com' AS source,
the_geom AS __geometry__

Expand All @@ -25,8 +23,6 @@ FROM
SELECT name,
ST_Area(the_geom)::bigint AS area,
'lake' AS kind,
'lake' AS waterway,
'water' AS natural,
'naturalearthdata.com' AS source,
the_geom AS __geometry__

Expand Down
8 changes: 1 addition & 7 deletions queries/water-areas-z11.pgsql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__
SELECT name, area, kind, source, __geometry__, __id__

FROM
(
Expand All @@ -8,9 +8,6 @@ FROM
SELECT '' AS name,
ST_Area(the_geom)::bigint AS area,
'ocean' AS kind,
'ocean' AS waterway,
'water' AS natural,
NULL AS landuse,
'openstreetmapdata.com' AS source,
the_geom AS __geometry__,
gid::varchar AS __id__
Expand All @@ -27,9 +24,6 @@ FROM
SELECT name,
ST_Area(way)::bigint AS area,
COALESCE("waterway", "natural", "landuse") AS kind,
"waterway",
"natural",
"landuse",
'openstreetmap.org' AS source,
way AS __geometry__,

Expand Down
8 changes: 1 addition & 7 deletions queries/water-areas-z12.pgsql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__
SELECT name, area, kind, source, __geometry__, __id__

FROM
(
Expand All @@ -8,9 +8,6 @@ FROM
SELECT '' AS name,
ST_Area(the_geom)::bigint AS area,
'ocean' AS kind,
'ocean' AS waterway,
'water' AS natural,
NULL AS landuse,
'openstreetmapdata.com' AS source,
the_geom AS __geometry__,
gid::varchar AS __id__
Expand All @@ -27,9 +24,6 @@ FROM
SELECT name,
ST_Area(way)::bigint AS area,
COALESCE("waterway", "natural", "landuse") AS kind,
"waterway",
"natural",
"landuse",
'openstreetmap.org' AS source,
way AS __geometry__,

Expand Down
8 changes: 1 addition & 7 deletions queries/water-areas-z13.pgsql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__
SELECT name, area, kind, source, __geometry__, __id__

FROM
(
Expand All @@ -8,9 +8,6 @@ FROM
SELECT '' AS name,
ST_Area(the_geom)::bigint AS area,
'ocean' AS kind,
'ocean' AS waterway,
'water' AS natural,
NULL AS landuse,
'openstreetmapdata.com' AS source,
the_geom AS __geometry__,
gid::varchar AS __id__
Expand All @@ -27,9 +24,6 @@ FROM
SELECT name,
ST_Area(way)::bigint AS area,
COALESCE("waterway", "natural", "landuse") AS kind,
"waterway",
"natural",
"landuse",
'openstreetmap.org' AS source,
way AS __geometry__,

Expand Down
Loading