Merge pull request #35 from openmaptiles/fix-issue-34

Quiet down 'has type unknown'
pull/57/merge
stirringhalo 2016-11-15 23:39:55 -05:00 zatwierdzone przez GitHub
commit c769577c56
4 zmienionych plików z 25 dodań i 25 usunięć

Wyświetl plik

@ -22,23 +22,23 @@ $$ LANGUAGE SQL IMMUTABLE;
-- etldoc: ne_110m_glaciated_areas -> landcover_z0
CREATE OR REPLACE VIEW landcover_z0 AS (
SELECT NULL::int AS osm_id, geom AS geometry, NULL AS landuse, 'glacier' AS "natural", NULL::text AS wetland FROM ne_110m_glaciated_areas
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier'::text AS "natural", NULL::text AS wetland FROM ne_110m_glaciated_areas
);
CREATE OR REPLACE VIEW landcover_z2 AS (
-- etldoc: ne_50m_glaciated_areas -> landcover_z2
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier' AS "natural", NULL::text AS wetland FROM ne_50m_glaciated_areas
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier'::text AS "natural", NULL::text AS wetland FROM ne_50m_glaciated_areas
UNION ALL
-- etldoc: ne_50m_antarctic_ice_shelves_polys -> landcover_z2
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf' AS "natural", NULL::text AS wetland FROM ne_50m_antarctic_ice_shelves_polys
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf'::text AS "natural", NULL::text AS wetland FROM ne_50m_antarctic_ice_shelves_polys
);
CREATE OR REPLACE VIEW landcover_z5 AS (
-- etldoc: ne_10m_glaciated_areas -> landcover_z5
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier' AS "natural", NULL::text AS wetland FROM ne_10m_glaciated_areas
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'glacier'::text AS "natural", NULL::text AS wetland FROM ne_10m_glaciated_areas
UNION ALL
-- etldoc: ne_10m_antarctic_ice_shelves_polys -> landcover_z5
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf' AS "natural", NULL::text AS wetland FROM ne_10m_antarctic_ice_shelves_polys
SELECT NULL::bigint AS osm_id, geom AS geometry, NULL::text AS landuse, 'ice_shelf'::text AS "natural", NULL::text AS wetland FROM ne_10m_antarctic_ice_shelves_polys
);
CREATE OR REPLACE VIEW landcover_z8 AS (

Wyświetl plik

@ -10,20 +10,20 @@ $$ LANGUAGE SQL IMMUTABLE;
-- etldoc: ne_50m_urban_areas -> landuse_z4
CREATE OR REPLACE VIEW landuse_z4 AS (
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential' AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
FROM ne_50m_urban_areas
WHERE scalerank <= 2
);
-- etldoc: ne_50m_urban_areas -> landuse_z5
CREATE OR REPLACE VIEW landuse_z5 AS (
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential' AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
FROM ne_50m_urban_areas
);
-- etldoc: ne_10m_urban_areas -> landuse_z6
CREATE OR REPLACE VIEW landuse_z6 AS (
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential' AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
SELECT NULL::bigint AS osm_id, geom AS geometry, 'residential'::text AS landuse, NULL::text AS amenity, NULL::text AS leisure, NULL::text AS boundary, scalerank
FROM ne_10m_urban_areas
);

Wyświetl plik

@ -6,55 +6,55 @@ $$ LANGUAGE SQL IMMUTABLE;
CREATE OR REPLACE VIEW water_z0 AS (
-- etldoc: ne_110m_ocean -> water_z0
SELECT geom, 'ocean' AS class FROM ne_110m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_110m_ocean
UNION ALL
-- etldoc: ne_110m_lakes -> water_z0
SELECT geom, 'lake' AS class FROM ne_110m_lakes
SELECT geom, 'lake'::text AS class FROM ne_110m_lakes
);
CREATE OR REPLACE VIEW water_z1 AS (
-- etldoc: ne_110m_ocean -> water_z1
SELECT geom, 'ocean' AS class FROM ne_110m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_110m_ocean
UNION ALL
-- etldoc: ne_110m_lakes -> water_z1
SELECT geom, 'lake' AS class FROM ne_110m_lakes
SELECT geom, 'lake'::text AS class FROM ne_110m_lakes
);
CREATE OR REPLACE VIEW water_z2 AS (
-- etldoc: ne_50m_ocean -> water_z2
SELECT geom, 'ocean' AS class FROM ne_50m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_50m_ocean
UNION ALL
-- etldoc: ne_50m_lakes -> water_z2
SELECT geom, 'lake' AS class FROM ne_50m_lakes
SELECT geom, 'lake'::text AS class FROM ne_50m_lakes
);
CREATE OR REPLACE VIEW water_z4 AS (
-- etldoc: ne_50m_ocean -> water_z4
SELECT geom, 'ocean' AS class FROM ne_50m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_50m_ocean
UNION ALL
-- etldoc: ne_50m_lakes -> water_z4
SELECT geom, 'lake' AS class FROM ne_50m_lakes
SELECT geom, 'lake'::text AS class FROM ne_50m_lakes
);
CREATE OR REPLACE VIEW water_z5 AS (
-- etldoc: ne_10m_ocean -> water_z5
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
UNION ALL
-- etldoc: ne_10m_lakes -> water_z5
SELECT geom, 'lake' AS class FROM ne_10m_lakes
SELECT geom, 'lake'::text AS class FROM ne_10m_lakes
);
CREATE OR REPLACE VIEW water_z6 AS (
-- etldoc: ne_10m_ocean -> water_z6
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
UNION ALL
-- etldoc: ne_10m_lakes -> water_z6
SELECT geom, 'lake' AS class FROM ne_10m_lakes
SELECT geom, 'lake'::text AS class FROM ne_10m_lakes
);
CREATE OR REPLACE VIEW water_z7 AS (
-- etldoc: ne_10m_ocean -> water_z7
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
UNION ALL
-- etldoc: osm_water_polygon_gen3 -> water_z7
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen3
@ -62,7 +62,7 @@ CREATE OR REPLACE VIEW water_z7 AS (
CREATE OR REPLACE VIEW water_z8 AS (
-- etldoc: ne_10m_ocean -> water_z8
SELECT geom, 'ocean' AS class FROM ne_10m_ocean
SELECT geom, 'ocean'::text AS class FROM ne_10m_ocean
UNION ALL
-- etldoc: osm_water_polygon_gen2 -> water_z8
SELECT geometry AS geom, 'lake' AS class FROM osm_water_polygon_gen2

Wyświetl plik

@ -1,19 +1,19 @@
-- etldoc: ne_110m_rivers_lake_centerlines -> waterway_z3
CREATE OR REPLACE VIEW waterway_z3 AS (
SELECT geom AS geometry, 'river' AS class FROM ne_110m_rivers_lake_centerlines
SELECT geom AS geometry, 'river'::text AS class FROM ne_110m_rivers_lake_centerlines
WHERE featurecla = 'River'
);
-- etldoc: ne_50m_rivers_lake_centerlines -> waterway_z4
CREATE OR REPLACE VIEW waterway_z4 AS (
SELECT geom AS geometry, 'river' AS class FROM ne_50m_rivers_lake_centerlines
SELECT geom AS geometry, 'river'::text AS class FROM ne_50m_rivers_lake_centerlines
WHERE featurecla = 'River'
);
-- etldoc: ne_10m_rivers_lake_centerlines -> waterway_z6
CREATE OR REPLACE VIEW waterway_z6 AS (
SELECT geom AS geometry, 'river' AS class FROM ne_10m_rivers_lake_centerlines
SELECT geom AS geometry, 'river'::text AS class FROM ne_10m_rivers_lake_centerlines
WHERE featurecla = 'River'
);