From 84849e0cf2ecf54f2e20fef61ffcb011bfe2db38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Mon, 30 Apr 2018 22:17:19 +0200 Subject: [PATCH 1/7] creating of generalized layer of buildings removed from imposm --- layers/building/mapping.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/layers/building/mapping.yaml b/layers/building/mapping.yaml index b12169d45..ca9d2b644 100644 --- a/layers/building/mapping.yaml +++ b/layers/building/mapping.yaml @@ -1,9 +1,9 @@ -generalized_tables: - # etldoc: imposm3 -> osm_building_polygon_gen1 - building_polygon_gen1: - source: building_polygon - sql_filter: area>power(ZRES12,2) AND ST_IsValid(geometry) - tolerance: ZRES14 +#generalized_tables: +# # etldoc: imposm3 -> osm_building_polygon_gen1 +# building_polygon_gen1: +# source: building_polygon +# sql_filter: area>power(ZRES12,2) AND ST_IsValid(geometry) +# tolerance: ZRES14 tables: # etldoc: imposm3 -> osm_building_polygon From 558417805e89511a6834fb10309d03c9a986c240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Mon, 30 Apr 2018 22:17:42 +0200 Subject: [PATCH 2/7] creating layer of generalize buildings --- layers/building/building.sql | 94 ++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/layers/building/building.sql b/layers/building/building.sql index e27093101..bf8aaaf4f 100644 --- a/layers/building/building.sql +++ b/layers/building/building.sql @@ -1,3 +1,97 @@ +--\timing on + +/* + * arbitrary tolerance, i don`t know, how to set zres values to sql script + * is possible use another values + */ + +\set tolerance2 10 --for ST_Simplify, clustering a and buffers for removing "slivers" + +\set tolerance1 40 --second power of this is used for removing small polygons and small holes + +DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists + +CREATE TABLE osm_building_polygon_gen1 +( + osm_id bigint primary key + , geometry geometry(GEOMETRY, 3857) +); + + +/* + * grouping buildings on ST_ClusterDBSCAN + * ST_ClusterDBSCAN is window function for creating groups of geometries closer + * than some distance + */ + +INSERT INTO osm_building_polygon_gen1 +WITH dta AS ( --CTE is used because of optimalization + SELECT osm_id, geometry + , ST_ClusterDBSCAN(geometry, eps := :tolerance2, minpoints := 1) over() cid + FROM osm_building_polygon +) +SELECT +(array_agg(osm_id))[1] +, ST_Buffer( + ST_MemUnion( + ST_Buffer( + geometry + , :tolerance2 + , 'join=mitre' + ) + ) + , -:tolerance2 + , 'join=mitre' +) geometry +FROM dta +GROUP BY cid; + +CREATE INDEX on osm_building_polygon_gen1 USING gist(geometry); + +--removing holes smaller than +UPDATE osm_building_polygon_gen1 +SET geometry = ( + SELECT ST_Collect( --there are some multigeometries in this layer + gn + ) + FROM ( + SELECT + COALESCE( --in some cases are "holes" NULL, because all holes are smaller than + ST_MakePolygon( + ST_ExteriorRing(dmp.geom) --exterior ring + , holes + ) + , + ST_MakePolygon( + ST_ExteriorRing(dmp.geom) + ) + ) gn + FROM + ST_Dump(geometry) dmp --1 dump polygons + , LATERAL ( + SELECT + ST_Accum( + ST_Boundary(rg.geom) --2 create array + ) holes + FROM + ST_DumpRings(dmp.geom) rg --3 from rings + WHERE rg.path[1] > 0 --5 except inner ring + AND ST_Area(rg.geom) >= power(:tolerance1,2) --4 bigger than + ) holes + ) new_geom +) +WHERE ST_NumInteriorRings(geometry) > 0; --only from geometries wih holes + +--delete small geometries +DELETE FROM osm_building_polygon_gen1 +WHERE ST_Area(geometry) < power(:tolerance1,2) +OR NOT ST_IsValid(geometry); --it was in imposm workflow, maybe it shoul better use ST_MakeValid + +--simplify +UPDATE osm_building_polygon_gen1 +SET geometry = ST_SimplifyPreserveTopology(geometry, :tolerance2::float); + + -- etldoc: layer_building[shape=record fillcolor=lightpink, style="rounded,filled", -- etldoc: label="layer_building | z13 | z14+ " ] ; From 0274e8c71e33943d3cd78e75718575e643862063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Tue, 15 May 2018 22:58:04 +0200 Subject: [PATCH 3/7] tolerance from zres and renaming of table with blocks --- layers/building/building.sql | 41 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/layers/building/building.sql b/layers/building/building.sql index bf8aaaf4f..2bb48bbb5 100644 --- a/layers/building/building.sql +++ b/layers/building/building.sql @@ -1,17 +1,16 @@ --\timing on -/* - * arbitrary tolerance, i don`t know, how to set zres values to sql script - * is possible use another values - */ +--for ST_Simplify, clustering a and buffers for removing "slivers" +SELECT zres(14) zres14 \gset -\set tolerance2 10 --for ST_Simplify, clustering a and buffers for removing "slivers" +--second power of this is used for removing small polygons and small holes +SELECT zres(12) zres12 \gset -\set tolerance1 40 --second power of this is used for removing small polygons and small holes +DROP TABLE IF EXISTS osm_building_block_gen1; --drop table, if exists -DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists +DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists, clean after previous version of sql script -CREATE TABLE osm_building_polygon_gen1 +CREATE TABLE osm_building_block_gen1 ( osm_id bigint primary key , geometry geometry(GEOMETRY, 3857) @@ -24,10 +23,10 @@ CREATE TABLE osm_building_polygon_gen1 * than some distance */ -INSERT INTO osm_building_polygon_gen1 +INSERT INTO osm_building_block_gen1 WITH dta AS ( --CTE is used because of optimalization SELECT osm_id, geometry - , ST_ClusterDBSCAN(geometry, eps := :tolerance2, minpoints := 1) over() cid + , ST_ClusterDBSCAN(geometry, eps := :zres14, minpoints := 1) over() cid FROM osm_building_polygon ) SELECT @@ -36,20 +35,20 @@ SELECT ST_MemUnion( ST_Buffer( geometry - , :tolerance2 + , :zres14 , 'join=mitre' ) ) - , -:tolerance2 + , -:zres14 , 'join=mitre' ) geometry FROM dta GROUP BY cid; -CREATE INDEX on osm_building_polygon_gen1 USING gist(geometry); +CREATE INDEX on osm_building_block_gen1 USING gist(geometry); --removing holes smaller than -UPDATE osm_building_polygon_gen1 +UPDATE osm_building_block_gen1 SET geometry = ( SELECT ST_Collect( --there are some multigeometries in this layer gn @@ -76,20 +75,20 @@ SET geometry = ( FROM ST_DumpRings(dmp.geom) rg --3 from rings WHERE rg.path[1] > 0 --5 except inner ring - AND ST_Area(rg.geom) >= power(:tolerance1,2) --4 bigger than + AND ST_Area(rg.geom) >= power(:zres12,2) --4 bigger than ) holes ) new_geom ) WHERE ST_NumInteriorRings(geometry) > 0; --only from geometries wih holes --delete small geometries -DELETE FROM osm_building_polygon_gen1 -WHERE ST_Area(geometry) < power(:tolerance1,2) +DELETE FROM osm_building_block_gen1 +WHERE ST_Area(geometry) < power(:zres12,2) OR NOT ST_IsValid(geometry); --it was in imposm workflow, maybe it shoul better use ST_MakeValid --simplify -UPDATE osm_building_polygon_gen1 -SET geometry = ST_SimplifyPreserveTopology(geometry, :tolerance2::float); +UPDATE osm_building_block_gen1 +SET geometry = ST_SimplifyPreserveTopology(geometry, :zres14::float); -- etldoc: layer_building[shape=record fillcolor=lightpink, style="rounded,filled", @@ -169,11 +168,11 @@ CREATE OR REPLACE FUNCTION layer_building(bbox geometry, zoom_level int) RETURNS TABLE(geometry geometry, osm_id bigint, render_height int, render_min_height int) AS $$ SELECT geometry, osm_id, render_height, render_min_height FROM ( - -- etldoc: osm_building_polygon_gen1 -> layer_building:z13 + -- etldoc: osm_building_block_gen1 -> layer_building:z13 SELECT osm_id, geometry, NULL::int AS render_height, NULL::int AS render_min_height - FROM osm_building_polygon_gen1 + FROM osm_building_block_gen1 WHERE zoom_level = 13 AND geometry && bbox UNION ALL -- etldoc: osm_building_polygon -> layer_building:z14_ From 81080ee1b3ce7dac936c96df00e98eb873a0ee4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Wed, 16 May 2018 17:01:53 +0200 Subject: [PATCH 4/7] transformed to matview --- layers/building/building.sql | 171 ++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 82 deletions(-) diff --git a/layers/building/building.sql b/layers/building/building.sql index 2bb48bbb5..50b3be1c0 100644 --- a/layers/building/building.sql +++ b/layers/building/building.sql @@ -1,95 +1,102 @@ + --\timing on ---for ST_Simplify, clustering a and buffers for removing "slivers" -SELECT zres(14) zres14 \gset +--fce, která bude vracet recordset a z tý bude matview +-- ---second power of this is used for removing small polygons and small holes -SELECT zres(12) zres12 \gset +CREATE OR REPLACE FUNCTION osm_building_block_gen1( ) +RETURNS table( + osm_id bigint + , geometry geometry +) +LANGUAGE plpgsql +VOLATILE + -- common options: IMMUTABLE STABLE STRICT SECURITY DEFINER +AS $function$ +DECLARE +zres14 float := Zres(14); +zres12 float := Zres(12); +BEGIN + FOR osm_id, geometry IN + WITH dta AS ( --CTE is used because of optimalization + SELECT o.osm_id, o.geometry + , ST_ClusterDBSCAN(o.geometry, eps := zres14, minpoints := 1) over() cid + FROM osm_building_polygon o + ) + SELECT + (array_agg(dta.osm_id))[1] + , ST_Buffer( + ST_MemUnion( + ST_Buffer( + dta.geometry + , zres14 + , 'join=mitre' + ) + ) + , -zres14 + , 'join=mitre' + ) geometry + FROM dta + GROUP BY cid + LOOP + --removing holes smaller than + IF ST_NumInteriorRings(geometry) > 0 THEN--only from geometries wih holes + geometry := ( + SELECT ST_Collect( --there are some multigeometries in this layer + gn + ) + FROM ( + SELECT + COALESCE( --in some cases are "holes" NULL, because all holes are smaller than + ST_MakePolygon( + ST_ExteriorRing(dmp.geom) --exterior ring + , holes + ) + , + ST_MakePolygon( + ST_ExteriorRing(dmp.geom) + ) + ) gn + FROM + ST_Dump(geometry) dmp --1 dump polygons + , LATERAL ( + SELECT + ST_Accum( + ST_Boundary(rg.geom) --2 create array + ) holes + FROM + ST_DumpRings(dmp.geom) rg --3 from rings + WHERE rg.path[1] > 0 --5 except inner ring + AND ST_Area(rg.geom) >= power(zres12,2) --4 bigger than + ) holes + ) new_geom + ); + END IF; + + IF ST_Area(geometry) < power(zres12,2) THEN + CONTINUE; + END IF; + + --simplify + geometry := ST_SimplifyPreserveTopology(geometry, zres14::float); + + RETURN NEXT; + END LOOP; +END; -DROP TABLE IF EXISTS osm_building_block_gen1; --drop table, if exists +$function$; -DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists, clean after previous version of sql script +DROP MATERIALIZED VIEW IF EXISTS osm_building_block_gen1; --drop table, if exists -CREATE TABLE osm_building_block_gen1 -( - osm_id bigint primary key - , geometry geometry(GEOMETRY, 3857) -); +DROP TABLE IF EXISTS osm_building_block_gen1; --drop table, if exists +DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists, clean after previous version of sql script -/* - * grouping buildings on ST_ClusterDBSCAN - * ST_ClusterDBSCAN is window function for creating groups of geometries closer - * than some distance - */ - -INSERT INTO osm_building_block_gen1 -WITH dta AS ( --CTE is used because of optimalization - SELECT osm_id, geometry - , ST_ClusterDBSCAN(geometry, eps := :zres14, minpoints := 1) over() cid - FROM osm_building_polygon -) -SELECT -(array_agg(osm_id))[1] -, ST_Buffer( - ST_MemUnion( - ST_Buffer( - geometry - , :zres14 - , 'join=mitre' - ) - ) - , -:zres14 - , 'join=mitre' -) geometry -FROM dta -GROUP BY cid; +CREATE MATERIALIZED VIEW osm_building_block_gen1 AS +SELECT * FROM osm_building_block_gen1(); CREATE INDEX on osm_building_block_gen1 USING gist(geometry); - ---removing holes smaller than -UPDATE osm_building_block_gen1 -SET geometry = ( - SELECT ST_Collect( --there are some multigeometries in this layer - gn - ) - FROM ( - SELECT - COALESCE( --in some cases are "holes" NULL, because all holes are smaller than - ST_MakePolygon( - ST_ExteriorRing(dmp.geom) --exterior ring - , holes - ) - , - ST_MakePolygon( - ST_ExteriorRing(dmp.geom) - ) - ) gn - FROM - ST_Dump(geometry) dmp --1 dump polygons - , LATERAL ( - SELECT - ST_Accum( - ST_Boundary(rg.geom) --2 create array - ) holes - FROM - ST_DumpRings(dmp.geom) rg --3 from rings - WHERE rg.path[1] > 0 --5 except inner ring - AND ST_Area(rg.geom) >= power(:zres12,2) --4 bigger than - ) holes - ) new_geom -) -WHERE ST_NumInteriorRings(geometry) > 0; --only from geometries wih holes - ---delete small geometries -DELETE FROM osm_building_block_gen1 -WHERE ST_Area(geometry) < power(:zres12,2) -OR NOT ST_IsValid(geometry); --it was in imposm workflow, maybe it shoul better use ST_MakeValid - ---simplify -UPDATE osm_building_block_gen1 -SET geometry = ST_SimplifyPreserveTopology(geometry, :zres14::float); - +CREATE UNIQUE INDEX on osm_building_block_gen1 USING btree(osm_id); -- etldoc: layer_building[shape=record fillcolor=lightpink, style="rounded,filled", -- etldoc: label="layer_building | z13 | z14+ " ] ; From 2c0aa12728e72b4eace79ebfa1c32be9a51f6719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Fri, 25 May 2018 18:13:31 +0200 Subject: [PATCH 5/7] update triggers --- layers/building/building.sql | 98 ----------------------------------- layers/building/building.yaml | 1 + 2 files changed, 1 insertion(+), 98 deletions(-) diff --git a/layers/building/building.sql b/layers/building/building.sql index 50b3be1c0..d1a92e86c 100644 --- a/layers/building/building.sql +++ b/layers/building/building.sql @@ -1,103 +1,5 @@ - --\timing on ---fce, která bude vracet recordset a z tý bude matview --- - -CREATE OR REPLACE FUNCTION osm_building_block_gen1( ) -RETURNS table( - osm_id bigint - , geometry geometry -) -LANGUAGE plpgsql -VOLATILE - -- common options: IMMUTABLE STABLE STRICT SECURITY DEFINER -AS $function$ -DECLARE -zres14 float := Zres(14); -zres12 float := Zres(12); -BEGIN - FOR osm_id, geometry IN - WITH dta AS ( --CTE is used because of optimalization - SELECT o.osm_id, o.geometry - , ST_ClusterDBSCAN(o.geometry, eps := zres14, minpoints := 1) over() cid - FROM osm_building_polygon o - ) - SELECT - (array_agg(dta.osm_id))[1] - , ST_Buffer( - ST_MemUnion( - ST_Buffer( - dta.geometry - , zres14 - , 'join=mitre' - ) - ) - , -zres14 - , 'join=mitre' - ) geometry - FROM dta - GROUP BY cid - LOOP - --removing holes smaller than - IF ST_NumInteriorRings(geometry) > 0 THEN--only from geometries wih holes - geometry := ( - SELECT ST_Collect( --there are some multigeometries in this layer - gn - ) - FROM ( - SELECT - COALESCE( --in some cases are "holes" NULL, because all holes are smaller than - ST_MakePolygon( - ST_ExteriorRing(dmp.geom) --exterior ring - , holes - ) - , - ST_MakePolygon( - ST_ExteriorRing(dmp.geom) - ) - ) gn - FROM - ST_Dump(geometry) dmp --1 dump polygons - , LATERAL ( - SELECT - ST_Accum( - ST_Boundary(rg.geom) --2 create array - ) holes - FROM - ST_DumpRings(dmp.geom) rg --3 from rings - WHERE rg.path[1] > 0 --5 except inner ring - AND ST_Area(rg.geom) >= power(zres12,2) --4 bigger than - ) holes - ) new_geom - ); - END IF; - - IF ST_Area(geometry) < power(zres12,2) THEN - CONTINUE; - END IF; - - --simplify - geometry := ST_SimplifyPreserveTopology(geometry, zres14::float); - - RETURN NEXT; - END LOOP; -END; - -$function$; - -DROP MATERIALIZED VIEW IF EXISTS osm_building_block_gen1; --drop table, if exists - -DROP TABLE IF EXISTS osm_building_block_gen1; --drop table, if exists - -DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists, clean after previous version of sql script - -CREATE MATERIALIZED VIEW osm_building_block_gen1 AS -SELECT * FROM osm_building_block_gen1(); - -CREATE INDEX on osm_building_block_gen1 USING gist(geometry); -CREATE UNIQUE INDEX on osm_building_block_gen1 USING btree(osm_id); - -- etldoc: layer_building[shape=record fillcolor=lightpink, style="rounded,filled", -- etldoc: label="layer_building | z13 | z14+ " ] ; diff --git a/layers/building/building.yaml b/layers/building/building.yaml index 7e391b59a..9461168f2 100644 --- a/layers/building/building.yaml +++ b/layers/building/building.yaml @@ -12,6 +12,7 @@ layer: render_min_height: | An approximated height from levels and height of the bottom of the building or building:part after the method of Paul Norman in [OSM Clear](https://github.com/ClearTables/osm-clear). For future 3D rendering of buildings. schema: + - ./update_building.sql - ./building.sql datasources: - type: imposm3 From 0fdf56482f086f059ec4f3f79caba661cc2095cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Fri, 25 May 2018 19:00:48 +0200 Subject: [PATCH 6/7] update triggers --- layers/building/update_building.sql | 139 ++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 layers/building/update_building.sql diff --git a/layers/building/update_building.sql b/layers/building/update_building.sql new file mode 100644 index 000000000..603784080 --- /dev/null +++ b/layers/building/update_building.sql @@ -0,0 +1,139 @@ +DROP TRIGGER IF EXISTS trigger_refresh ON buildings.updates; +DROP TRIGGER IF EXISTS trigger_flag ON osm_building_polygon; + +--creating aggregated building blocks with removed small polzgons and small +--holes. Aggregated polzgons are simplified. + +--function returning recordset for matview +--returning recordset of buildings aggregates by zres 14, with removed small +--holes and with removed small buildings/blocks +-- + +CREATE OR REPLACE FUNCTION osm_building_block_gen1( ) +RETURNS table( + osm_id bigint + , geometry geometry +) +LANGUAGE plpgsql +VOLATILE + -- common options: IMMUTABLE STABLE STRICT SECURITY DEFINER +AS $function$ +DECLARE +zres14 float := Zres(14); +zres12 float := Zres(12); +BEGIN + FOR osm_id, geometry IN + WITH dta AS ( --CTE is used because of optimalization + SELECT o.osm_id, o.geometry + , ST_ClusterDBSCAN(o.geometry, eps := zres14, minpoints := 1) over() cid + FROM osm_building_polygon o + ) + SELECT + (array_agg(dta.osm_id))[1] + , ST_Buffer( + ST_MemUnion( + ST_Buffer( + dta.geometry + , zres14 + , 'join=mitre' + ) + ) + , -zres14 + , 'join=mitre' + ) geometry + FROM dta + GROUP BY cid + LOOP + --removing holes smaller than + IF ST_NumInteriorRings(geometry) > 0 THEN--only from geometries wih holes + geometry := ( + SELECT ST_Collect( --there are some multigeometries in this layer + gn + ) + FROM ( + SELECT + COALESCE( --in some cases are "holes" NULL, because all holes are smaller than + ST_MakePolygon( + ST_ExteriorRing(dmp.geom) --exterior ring + , holes + ) + , + ST_MakePolygon( + ST_ExteriorRing(dmp.geom) + ) + ) gn + FROM + ST_Dump(geometry) dmp --1 dump polygons + , LATERAL ( + SELECT + ST_Accum( + ST_Boundary(rg.geom) --2 create array + ) holes + FROM + ST_DumpRings(dmp.geom) rg --3 from rings + WHERE rg.path[1] > 0 --5 except inner ring + AND ST_Area(rg.geom) >= power(zres12,2) --4 bigger than + ) holes + ) new_geom + ); + END IF; + + IF ST_Area(geometry) < power(zres12,2) THEN + CONTINUE; + END IF; + + --simplify + geometry := ST_SimplifyPreserveTopology(geometry, zres14::float); + + RETURN NEXT; + END LOOP; +END; + +$function$; + +DROP MATERIALIZED VIEW IF EXISTS osm_building_block_gen1; --drop table, if exists + +DROP TABLE IF EXISTS osm_building_block_gen1; --drop table, if exists + +DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists, clean after previous version of sql script + +CREATE MATERIALIZED VIEW osm_building_block_gen1 AS +SELECT * FROM osm_building_block_gen1(); + +CREATE INDEX on osm_building_block_gen1 USING gist(geometry); +CREATE UNIQUE INDEX on osm_building_block_gen1 USING btree(osm_id); + + +-- Handle updates + +CREATE SCHEMA IF NOT EXISTS buildings; + +CREATE TABLE IF NOT EXISTS buildings.updates(id serial primary key, t text, unique (t)); +CREATE OR REPLACE FUNCTION buildings.flag() RETURNS trigger AS $$ +BEGIN + INSERT INTO buildings.updates(t) VALUES ('y') ON CONFLICT(t) DO NOTHING; + RETURN null; +END; +$$ language plpgsql; + +CREATE OR REPLACE FUNCTION buildings.refresh() RETURNS trigger AS + $BODY$ + BEGIN + RAISE LOG 'Refresh buildings block'; + REFRESH MATERIALIZED VIEW osm_building_block_gen1; + DELETE FROM buildings.updates; + RETURN null; + END; + $BODY$ +language plpgsql; + +CREATE TRIGGER trigger_flag + AFTER INSERT OR UPDATE OR DELETE ON osm_building_polygon + FOR EACH STATEMENT + EXECUTE PROCEDURE buildings.flag(); + +CREATE CONSTRAINT TRIGGER trigger_refresh + AFTER INSERT ON buildings.updates + INITIALLY DEFERRED + FOR EACH ROW + EXECUTE PROCEDURE buildings.refresh(); From dc8ed72b4291c721b47873e16bc2c043b2d7af7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mich=C3=A1lek?= Date: Fri, 1 Jun 2018 13:47:11 +0200 Subject: [PATCH 7/7] remove cleaning after previous versions --- layers/building/update_building.sql | 3 --- 1 file changed, 3 deletions(-) diff --git a/layers/building/update_building.sql b/layers/building/update_building.sql index 603784080..a67c24ddf 100644 --- a/layers/building/update_building.sql +++ b/layers/building/update_building.sql @@ -93,9 +93,6 @@ $function$; DROP MATERIALIZED VIEW IF EXISTS osm_building_block_gen1; --drop table, if exists -DROP TABLE IF EXISTS osm_building_block_gen1; --drop table, if exists - -DROP TABLE IF EXISTS osm_building_polygon_gen1; --drop table, if exists, clean after previous version of sql script CREATE MATERIALIZED VIEW osm_building_block_gen1 AS SELECT * FROM osm_building_block_gen1();