Merge pull request #704 from eva-j/577_disputed_ne

Adding disputed borders of NE sources
pull/708/head
Eva Jelinkova 2019-11-11 17:20:22 +01:00 zatwierdzone przez GitHub
commit acb54e5e50
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 16 dodań i 4 usunięć

Wyświetl plik

@ -3,7 +3,10 @@
-- etldoc: ne_110m_admin_0_boundary_lines_land -> boundary_z0
CREATE OR REPLACE VIEW boundary_z0 AS (
SELECT geometry, 2 AS admin_level, false AS disputed, false AS maritime
SELECT geometry,
2 AS admin_level,
(CASE WHEN featurecla LIKE 'Disputed%' THEN true ELSE false END) AS disputed,
false AS maritime
FROM ne_110m_admin_0_boundary_lines_land
);
@ -11,7 +14,10 @@ CREATE OR REPLACE VIEW boundary_z0 AS (
-- etldoc: ne_50m_admin_1_states_provinces_lines -> boundary_z1
CREATE OR REPLACE VIEW boundary_z1 AS (
SELECT geometry, 2 AS admin_level, false AS disputed, false AS maritime
SELECT geometry,
2 AS admin_level,
(CASE WHEN featurecla LIKE 'Disputed%' THEN true ELSE false END) AS disputed,
false AS maritime
FROM ne_50m_admin_0_boundary_lines_land
UNION ALL
SELECT geometry, 4 AS admin_level, false AS disputed, false AS maritime
@ -23,7 +29,10 @@ CREATE OR REPLACE VIEW boundary_z1 AS (
-- etldoc: ne_50m_admin_1_states_provinces_lines -> boundary_z3
CREATE OR REPLACE VIEW boundary_z3 AS (
SELECT geometry, 2 AS admin_level, false AS disputed, false AS maritime
SELECT geometry,
2 AS admin_level,
(CASE WHEN featurecla LIKE 'Disputed%' THEN true ELSE false END) AS disputed,
false AS maritime
FROM ne_50m_admin_0_boundary_lines_land
UNION ALL
SELECT geometry, 4 AS admin_level, false AS disputed, false AS maritime
@ -36,7 +45,10 @@ CREATE OR REPLACE VIEW boundary_z3 AS (
-- etldoc: osm_border_linestring_gen10 -> boundary_z4
CREATE OR REPLACE VIEW boundary_z4 AS (
SELECT geometry, 2 AS admin_level, false AS disputed, false AS maritime
SELECT geometry,
2 AS admin_level,
(CASE WHEN featurecla LIKE 'Disputed%' THEN true ELSE false END) AS disputed,
false AS maritime
FROM ne_10m_admin_0_boundary_lines_land
WHERE featurecla <> 'Lease limit'
UNION ALL