kopia lustrzana https://github.com/openmaptiles/openmaptiles
Fix maritime low zooms (#1644)
This PR fixes boundary layer at low zoom levels: -z4 - remove maritime boundary (Peru, northern and southern end of boundary between Canada and Alaska). -z1-z4 - do not mix disputed boundary from NE and OSM - linestrings got duplicated. Use only NE data (z0-z4), then OSM data (z5+)pull/1643/head
rodzic
585b71f666
commit
136e1db4d1
|
@ -150,38 +150,10 @@ CREATE MATERIALIZED VIEW osm_border_linestring_gen_z4 AS
|
||||||
(
|
(
|
||||||
SELECT ST_Simplify(geometry, ZRes(5)) AS geometry, adm0_l, adm0_r, admin_level, disputed, name, claimed_by, maritime
|
SELECT ST_Simplify(geometry, ZRes(5)) AS geometry, adm0_l, adm0_r, admin_level, disputed, name, claimed_by, maritime
|
||||||
FROM osm_border_linestring_gen_z5
|
FROM osm_border_linestring_gen_z5
|
||||||
WHERE admin_level = 2 AND (maritime OR disputed)
|
WHERE admin_level = 2 AND maritime
|
||||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
||||||
CREATE INDEX IF NOT EXISTS osm_border_linestring_gen_z4_idx ON osm_border_linestring_gen_z4 USING gist (geometry);
|
CREATE INDEX IF NOT EXISTS osm_border_linestring_gen_z4_idx ON osm_border_linestring_gen_z4 USING gist (geometry);
|
||||||
|
|
||||||
-- etldoc: osm_border_linestring_gen_z4 -> osm_border_disp_linestring_gen_z3
|
|
||||||
DROP MATERIALIZED VIEW IF EXISTS osm_border_disp_linestring_gen_z3 CASCADE;
|
|
||||||
CREATE MATERIALIZED VIEW osm_border_disp_linestring_gen_z3 AS
|
|
||||||
(
|
|
||||||
SELECT ST_Simplify(geometry, ZRes(4)) AS geometry, adm0_l, adm0_r, admin_level, TRUE AS disputed, name, claimed_by, maritime
|
|
||||||
FROM osm_border_linestring_gen_z4
|
|
||||||
WHERE disputed -- AND admin_level = 2
|
|
||||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
|
||||||
CREATE INDEX IF NOT EXISTS osm_border_disp_linestring_gen_z3_idx ON osm_border_disp_linestring_gen_z3 USING gist (geometry);
|
|
||||||
|
|
||||||
-- etldoc: osm_border_disp_linestring_gen_z3 -> osm_border_disp_linestring_gen_z2
|
|
||||||
DROP MATERIALIZED VIEW IF EXISTS osm_border_disp_linestring_gen_z2 CASCADE;
|
|
||||||
CREATE MATERIALIZED VIEW osm_border_disp_linestring_gen_z2 AS
|
|
||||||
(
|
|
||||||
SELECT ST_Simplify(geometry, ZRes(3)) AS geometry, adm0_l, adm0_r, admin_level, TRUE AS disputed, name, claimed_by, maritime
|
|
||||||
FROM osm_border_disp_linestring_gen_z3
|
|
||||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
|
||||||
CREATE INDEX IF NOT EXISTS osm_border_disp_linestring_gen_z2_idx ON osm_border_disp_linestring_gen_z2 USING gist (geometry);
|
|
||||||
|
|
||||||
-- etldoc: osm_border_disp_linestring_gen_z2 -> osm_border_disp_linestring_gen_z1
|
|
||||||
DROP MATERIALIZED VIEW IF EXISTS osm_border_disp_linestring_gen_z1 CASCADE;
|
|
||||||
CREATE MATERIALIZED VIEW osm_border_disp_linestring_gen_z1 AS
|
|
||||||
(
|
|
||||||
SELECT ST_Simplify(geometry, ZRes(2)) AS geometry, adm0_l, adm0_r, admin_level, TRUE AS disputed, name, claimed_by, maritime
|
|
||||||
FROM osm_border_disp_linestring_gen_z2
|
|
||||||
) /* DELAY_MATERIALIZED_VIEW_CREATION */ ;
|
|
||||||
CREATE INDEX IF NOT EXISTS osm_border_disp_linestring_gen_z1_idx ON osm_border_disp_linestring_gen_z1 USING gist (geometry);
|
|
||||||
|
|
||||||
-- ne_10m_admin_0_boundary_lines_land
|
-- ne_10m_admin_0_boundary_lines_land
|
||||||
-- etldoc: ne_10m_admin_0_boundary_lines_land -> ne_10m_admin_0_boundary_lines_land_gen_z4
|
-- etldoc: ne_10m_admin_0_boundary_lines_land -> ne_10m_admin_0_boundary_lines_land_gen_z4
|
||||||
DROP MATERIALIZED VIEW IF EXISTS ne_10m_admin_0_boundary_lines_land_gen_z4 CASCADE;
|
DROP MATERIALIZED VIEW IF EXISTS ne_10m_admin_0_boundary_lines_land_gen_z4 CASCADE;
|
||||||
|
@ -370,16 +342,6 @@ SELECT geometry,
|
||||||
claimed_by,
|
claimed_by,
|
||||||
maritime
|
maritime
|
||||||
FROM ne_10m_admin_1_states_provinces_lines_gen_z1
|
FROM ne_10m_admin_1_states_provinces_lines_gen_z1
|
||||||
UNION ALL
|
|
||||||
SELECT geometry,
|
|
||||||
admin_level,
|
|
||||||
NULL::text AS adm0_l,
|
|
||||||
NULL::text AS adm0_r,
|
|
||||||
TRUE AS disputed,
|
|
||||||
edit_name(name) AS disputed_name,
|
|
||||||
claimed_by,
|
|
||||||
maritime
|
|
||||||
FROM osm_border_disp_linestring_gen_z1
|
|
||||||
);
|
);
|
||||||
CREATE INDEX IF NOT EXISTS boundary_z1_idx ON boundary_z1 USING gist (geometry);
|
CREATE INDEX IF NOT EXISTS boundary_z1_idx ON boundary_z1 USING gist (geometry);
|
||||||
|
|
||||||
|
@ -409,16 +371,6 @@ SELECT geometry,
|
||||||
claimed_by,
|
claimed_by,
|
||||||
maritime
|
maritime
|
||||||
FROM ne_10m_admin_1_states_provinces_lines_gen_z2
|
FROM ne_10m_admin_1_states_provinces_lines_gen_z2
|
||||||
UNION ALL
|
|
||||||
SELECT geometry,
|
|
||||||
admin_level,
|
|
||||||
NULL::text AS adm0_l,
|
|
||||||
NULL::text AS adm0_r,
|
|
||||||
TRUE AS disputed,
|
|
||||||
edit_name(name) AS disputed_name,
|
|
||||||
claimed_by,
|
|
||||||
maritime
|
|
||||||
FROM osm_border_disp_linestring_gen_z2
|
|
||||||
);
|
);
|
||||||
CREATE INDEX IF NOT EXISTS boundary_z2_idx ON boundary_z2 USING gist (geometry);
|
CREATE INDEX IF NOT EXISTS boundary_z2_idx ON boundary_z2 USING gist (geometry);
|
||||||
|
|
||||||
|
@ -447,16 +399,6 @@ SELECT geometry,
|
||||||
claimed_by,
|
claimed_by,
|
||||||
maritime
|
maritime
|
||||||
FROM ne_10m_admin_1_states_provinces_lines_gen_z3
|
FROM ne_10m_admin_1_states_provinces_lines_gen_z3
|
||||||
UNION ALL
|
|
||||||
SELECT geometry,
|
|
||||||
admin_level,
|
|
||||||
NULL::text AS adm0_l,
|
|
||||||
NULL::text AS adm0_r,
|
|
||||||
TRUE AS disputed,
|
|
||||||
edit_name(name) AS disputed_name,
|
|
||||||
claimed_by,
|
|
||||||
maritime
|
|
||||||
FROM osm_border_disp_linestring_gen_z3
|
|
||||||
);
|
);
|
||||||
CREATE INDEX IF NOT EXISTS boundary_z3_idx ON boundary_z3 USING gist (geometry);
|
CREATE INDEX IF NOT EXISTS boundary_z3_idx ON boundary_z3 USING gist (geometry);
|
||||||
|
|
||||||
|
|
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 910 KiB Po Szerokość: | Wysokość: | Rozmiar: 759 KiB |
Ładowanie…
Reference in New Issue