From a24e775dc124c41045ea59dbdbf8d7a369715aa4 Mon Sep 17 00:00:00 2001 From: Harish Krishna Date: Tue, 27 May 2014 15:46:36 -0400 Subject: [PATCH] removing all nullable columns that were added to make it work with the opensciencemap/vtm stylesheets --- queries/buildings-z13.pgsql | 4 +--- queries/buildings-z14.pgsql | 4 +--- queries/buildings-z15.pgsql | 4 +--- queries/buildings-z16.pgsql | 4 +--- queries/buildings-z17.pgsql | 4 +--- queries/land-usages-z10.pgsql | 2 +- queries/land-usages-z11.pgsql | 2 +- queries/land-usages-z12.pgsql | 2 +- queries/land-usages-z13.pgsql | 2 +- queries/land-usages-z14.pgsql | 2 +- queries/land-usages-z15.pgsql | 2 +- queries/land-usages-z16.pgsql | 3 +-- queries/land-usages-z4.pgsql | 2 +- queries/land-usages-z6.pgsql | 2 +- queries/land-usages-z9.pgsql | 2 +- queries/places-z0.pgsql | 2 +- queries/places-z12.pgsql | 2 +- queries/places-z3.pgsql | 2 +- queries/places-z7.pgsql | 2 +- queries/pois-z10.pgsql | 3 +-- queries/pois-z11.pgsql | 3 +-- queries/pois-z12.pgsql | 3 +-- queries/pois-z13.pgsql | 3 +-- queries/pois-z14.pgsql | 3 +-- queries/pois-z15.pgsql | 5 +---- queries/pois-z16.pgsql | 5 +---- queries/pois-z17.pgsql | 5 +---- queries/pois-z18.pgsql | 5 +---- queries/pois-z9.pgsql | 3 +-- queries/water-areas-z0.pgsql | 6 +----- queries/water-areas-z11.pgsql | 8 +------- queries/water-areas-z12.pgsql | 8 +------- queries/water-areas-z13.pgsql | 8 +------- queries/water-areas-z14.pgsql | 8 +------- queries/water-areas-z15.pgsql | 8 +------- queries/water-areas-z16.pgsql | 8 +------- queries/water-areas-z4.pgsql | 8 +------- queries/water-areas-z6.pgsql | 8 +------- queries/water-areas-z9.pgsql | 8 +------- 39 files changed, 39 insertions(+), 126 deletions(-) diff --git a/queries/buildings-z13.pgsql b/queries/buildings-z13.pgsql index 738c3f330..441750d54 100644 --- a/queries/buildings-z13.pgsql +++ b/queries/buildings-z13.pgsql @@ -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, diff --git a/queries/buildings-z14.pgsql b/queries/buildings-z14.pgsql index dd1981d6b..741c50dab 100644 --- a/queries/buildings-z14.pgsql +++ b/queries/buildings-z14.pgsql @@ -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, diff --git a/queries/buildings-z15.pgsql b/queries/buildings-z15.pgsql index 659b38007..788fbecbe 100644 --- a/queries/buildings-z15.pgsql +++ b/queries/buildings-z15.pgsql @@ -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, diff --git a/queries/buildings-z16.pgsql b/queries/buildings-z16.pgsql index c29263c6d..907d8b1c1 100644 --- a/queries/buildings-z16.pgsql +++ b/queries/buildings-z16.pgsql @@ -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, diff --git a/queries/buildings-z17.pgsql b/queries/buildings-z17.pgsql index 885c55e97..77659d933 100644 --- a/queries/buildings-z17.pgsql +++ b/queries/buildings-z17.pgsql @@ -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, diff --git a/queries/land-usages-z10.pgsql b/queries/land-usages-z10.pgsql index a8ba0ef78..defbc8c98 100644 --- a/queries/land-usages-z10.pgsql +++ b/queries/land-usages-z10.pgsql @@ -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. -- diff --git a/queries/land-usages-z11.pgsql b/queries/land-usages-z11.pgsql index 2c32a36c7..bb2506afa 100644 --- a/queries/land-usages-z11.pgsql +++ b/queries/land-usages-z11.pgsql @@ -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. -- diff --git a/queries/land-usages-z12.pgsql b/queries/land-usages-z12.pgsql index 2ec823ef3..59034d1bb 100644 --- a/queries/land-usages-z12.pgsql +++ b/queries/land-usages-z12.pgsql @@ -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. -- diff --git a/queries/land-usages-z13.pgsql b/queries/land-usages-z13.pgsql index 8f88fda67..bdff8a35f 100644 --- a/queries/land-usages-z13.pgsql +++ b/queries/land-usages-z13.pgsql @@ -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. -- diff --git a/queries/land-usages-z14.pgsql b/queries/land-usages-z14.pgsql index c080b5ae6..bdb89d346 100644 --- a/queries/land-usages-z14.pgsql +++ b/queries/land-usages-z14.pgsql @@ -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. -- diff --git a/queries/land-usages-z15.pgsql b/queries/land-usages-z15.pgsql index 317bbb15f..8a63e6540 100644 --- a/queries/land-usages-z15.pgsql +++ b/queries/land-usages-z15.pgsql @@ -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. -- diff --git a/queries/land-usages-z16.pgsql b/queries/land-usages-z16.pgsql index 95cbdb9d4..164c01619 100644 --- a/queries/land-usages-z16.pgsql +++ b/queries/land-usages-z16.pgsql @@ -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. -- diff --git a/queries/land-usages-z4.pgsql b/queries/land-usages-z4.pgsql index 4564bfa7e..89aaba6e5 100644 --- a/queries/land-usages-z4.pgsql +++ b/queries/land-usages-z4.pgsql @@ -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, diff --git a/queries/land-usages-z6.pgsql b/queries/land-usages-z6.pgsql index 016acc973..2000dfe8f 100644 --- a/queries/land-usages-z6.pgsql +++ b/queries/land-usages-z6.pgsql @@ -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, diff --git a/queries/land-usages-z9.pgsql b/queries/land-usages-z9.pgsql index c621fcaad..481da58f2 100644 --- a/queries/land-usages-z9.pgsql +++ b/queries/land-usages-z9.pgsql @@ -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. -- diff --git a/queries/places-z0.pgsql b/queries/places-z0.pgsql index 44dbb2ef0..4f03f8318 100644 --- a/queries/places-z0.pgsql +++ b/queries/places-z0.pgsql @@ -1,6 +1,6 @@ SELECT name, - place, + COALESCE("place") AS kind, way AS __geometry__ FROM planet_osm_point diff --git a/queries/places-z12.pgsql b/queries/places-z12.pgsql index ea6e8fc78..0729183b0 100644 --- a/queries/places-z12.pgsql +++ b/queries/places-z12.pgsql @@ -1,6 +1,6 @@ SELECT name, - place, + COALESCE("place") AS kind, way AS __geometry__ FROM planet_osm_point diff --git a/queries/places-z3.pgsql b/queries/places-z3.pgsql index 7f26f4a5c..e78c7603e 100644 --- a/queries/places-z3.pgsql +++ b/queries/places-z3.pgsql @@ -1,6 +1,6 @@ SELECT name, - place, + COALESCE("place") AS kind, way AS __geometry__ FROM planet_osm_point diff --git a/queries/places-z7.pgsql b/queries/places-z7.pgsql index 8af366271..fd561b8e3 100644 --- a/queries/places-z7.pgsql +++ b/queries/places-z7.pgsql @@ -1,6 +1,6 @@ SELECT name, - place, + COALESCE("place") AS kind, way AS __geometry__ FROM planet_osm_point diff --git a/queries/pois-z10.pgsql b/queries/pois-z10.pgsql index 7620c5907..8f9f871a0 100644 --- a/queries/pois-z10.pgsql +++ b/queries/pois-z10.pgsql @@ -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 diff --git a/queries/pois-z11.pgsql b/queries/pois-z11.pgsql index 11aa35e98..6446574ec 100644 --- a/queries/pois-z11.pgsql +++ b/queries/pois-z11.pgsql @@ -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 diff --git a/queries/pois-z12.pgsql b/queries/pois-z12.pgsql index f84f7002b..3eeb0948e 100644 --- a/queries/pois-z12.pgsql +++ b/queries/pois-z12.pgsql @@ -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 diff --git a/queries/pois-z13.pgsql b/queries/pois-z13.pgsql index d1f43ae5a..979187365 100644 --- a/queries/pois-z13.pgsql +++ b/queries/pois-z13.pgsql @@ -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 diff --git a/queries/pois-z14.pgsql b/queries/pois-z14.pgsql index 01037a5ee..f64575002 100644 --- a/queries/pois-z14.pgsql +++ b/queries/pois-z14.pgsql @@ -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 diff --git a/queries/pois-z15.pgsql b/queries/pois-z15.pgsql index d0430a3cb..0b41dc400 100644 --- a/queries/pois-z15.pgsql +++ b/queries/pois-z15.pgsql @@ -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 diff --git a/queries/pois-z16.pgsql b/queries/pois-z16.pgsql index c4063c6f8..b5a323aa7 100644 --- a/queries/pois-z16.pgsql +++ b/queries/pois-z16.pgsql @@ -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 diff --git a/queries/pois-z17.pgsql b/queries/pois-z17.pgsql index aebd3d637..f421ae90c 100644 --- a/queries/pois-z17.pgsql +++ b/queries/pois-z17.pgsql @@ -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 diff --git a/queries/pois-z18.pgsql b/queries/pois-z18.pgsql index 09e0ebbd2..3ecd5e3ec 100644 --- a/queries/pois-z18.pgsql +++ b/queries/pois-z18.pgsql @@ -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 diff --git a/queries/pois-z9.pgsql b/queries/pois-z9.pgsql index 7620c5907..8f9f871a0 100644 --- a/queries/pois-z9.pgsql +++ b/queries/pois-z9.pgsql @@ -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 diff --git a/queries/water-areas-z0.pgsql b/queries/water-areas-z0.pgsql index 41290ff90..501d55618 100644 --- a/queries/water-areas-z0.pgsql +++ b/queries/water-areas-z0.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", source, __geometry__ +SELECT name, area, kind, source, __geometry__ FROM ( @@ -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__ @@ -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__ diff --git a/queries/water-areas-z11.pgsql b/queries/water-areas-z11.pgsql index 33e3698fe..55001c0a3 100644 --- a/queries/water-areas-z11.pgsql +++ b/queries/water-areas-z11.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__, diff --git a/queries/water-areas-z12.pgsql b/queries/water-areas-z12.pgsql index 6b00660a4..e5bb3e4ff 100644 --- a/queries/water-areas-z12.pgsql +++ b/queries/water-areas-z12.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__, diff --git a/queries/water-areas-z13.pgsql b/queries/water-areas-z13.pgsql index 9d39b791a..2a3d1d2da 100644 --- a/queries/water-areas-z13.pgsql +++ b/queries/water-areas-z13.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__, diff --git a/queries/water-areas-z14.pgsql b/queries/water-areas-z14.pgsql index 67c52641a..576435ed9 100644 --- a/queries/water-areas-z14.pgsql +++ b/queries/water-areas-z14.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__, diff --git a/queries/water-areas-z15.pgsql b/queries/water-areas-z15.pgsql index efb899763..afa9db6fd 100644 --- a/queries/water-areas-z15.pgsql +++ b/queries/water-areas-z15.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__, diff --git a/queries/water-areas-z16.pgsql b/queries/water-areas-z16.pgsql index 44685dc0a..b5f2a8ed5 100644 --- a/queries/water-areas-z16.pgsql +++ b/queries/water-areas-z16.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__, diff --git a/queries/water-areas-z4.pgsql b/queries/water-areas-z4.pgsql index 4ac1d6fb6..38aae119a 100644 --- a/queries/water-areas-z4.pgsql +++ b/queries/water-areas-z4.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", source, __geometry__ +SELECT name, area, kind, source, __geometry__ FROM ( @@ -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__ @@ -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__ @@ -42,8 +38,6 @@ FROM SELECT name, ST_Area(the_geom)::bigint AS area, 'playa' AS kind, - 'playa' AS waterway, - 'water' AS natural, 'naturalearthdata.com' AS source, the_geom AS __geometry__ diff --git a/queries/water-areas-z6.pgsql b/queries/water-areas-z6.pgsql index 6f3c98437..3c77ebe0b 100644 --- a/queries/water-areas-z6.pgsql +++ b/queries/water-areas-z6.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", source, __geometry__ +SELECT name, area, kind, source, __geometry__ FROM ( @@ -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__ @@ -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__ @@ -42,8 +38,6 @@ FROM SELECT name, ST_Area(the_geom)::bigint AS area, 'playa' AS kind, - 'playa' AS waterway, - 'water' AS natural, 'naturalearthdata.com' AS source, the_geom AS __geometry__ diff --git a/queries/water-areas-z9.pgsql b/queries/water-areas-z9.pgsql index 1ae2cb38d..8190472c2 100644 --- a/queries/water-areas-z9.pgsql +++ b/queries/water-areas-z9.pgsql @@ -1,4 +1,4 @@ -SELECT name, area, kind, waterway, "natural", landuse, source, __geometry__, __id__ +SELECT name, area, kind, source, __geometry__, __id__ FROM ( @@ -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__ @@ -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__,