This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch materialized-views
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git


The following commit(s) were added to refs/heads/materialized-views by this 
push:
     new bba9f4b72 Remove the refresh scripts
bba9f4b72 is described below

commit bba9f4b72e28eaa05189e8f180143394a6c7789b
Author: Bertil Chapuis <[email protected]>
AuthorDate: Mon Jan 13 13:55:22 2025 +0100

    Remove the refresh scripts
---
 basemap/create.js                   |   2 +-
 basemap/layers/amenity/create.sql   | 272 +++++++++++++++++++++++++++++++--
 basemap/layers/amenity/refresh.sql  | 292 ------------------------------------
 basemap/layers/highway/create.sql   | 151 +++++++++++++++++--
 basemap/layers/highway/refresh.sql  | 163 --------------------
 basemap/layers/landuse/create.sql   | 269 +++++++++++++++++++++++++++++++--
 basemap/layers/landuse/refresh.sql  | 292 ------------------------------------
 basemap/layers/leisure/create.sql   | 267 +++++++++++++++++++++++++++++++--
 basemap/layers/leisure/refresh.sql  | 292 ------------------------------------
 basemap/layers/member/create.sql    |   9 +-
 basemap/layers/member/refresh.sql   |  22 ---
 basemap/layers/natural/create.sql   | 268 +++++++++++++++++++++++++++++++--
 basemap/layers/natural/refresh.sql  | 292 ------------------------------------
 basemap/layers/node/create.sql      |  18 ++-
 basemap/layers/node/refresh.sql     |  29 ----
 basemap/layers/ocean/create.sql     |  20 ++-
 basemap/layers/ocean/refresh.sql    |  33 ----
 basemap/layers/point/create.sql     | 130 ++++++++++++++--
 basemap/layers/point/refresh.sql    | 143 ------------------
 basemap/layers/railway/create.sql   | 150 ++++++++++++++++--
 basemap/layers/railway/refresh.sql  | 163 --------------------
 basemap/layers/relation/create.sql  |  18 ++-
 basemap/layers/relation/refresh.sql |  29 ----
 basemap/layers/route/create.sql     | 150 ++++++++++++++++--
 basemap/layers/route/refresh.sql    | 163 --------------------
 basemap/layers/waterway/create.sql  | 150 ++++++++++++++++--
 basemap/layers/waterway/refresh.sql | 163 --------------------
 basemap/layers/way/create.sql       |  16 ++
 basemap/layers/way/refresh.sql      |  29 ----
 29 files changed, 1751 insertions(+), 2244 deletions(-)

diff --git a/basemap/create.js b/basemap/create.js
index c2b85a335..e3e489ae9 100644
--- a/basemap/create.js
+++ b/basemap/create.js
@@ -19,7 +19,7 @@ import config from "./config.js";
 export default {
     "steps": [
         {
-            "id": "openstreetmap-water-polygons",
+            "id": "create",
             "needs": [],
             "tasks": [
                 // Initialization
diff --git a/basemap/layers/amenity/create.sql 
b/basemap/layers/amenity/create.sql
index d3020cb4c..571b2ce3d 100644
--- a/basemap/layers/amenity/create.sql
+++ b/basemap/layers/amenity/create.sql
@@ -118,7 +118,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 12 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 12 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z12_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z12_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z12_filtered_geom_idx ON
+    osm_amenity_z12_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z12_filtered_tags_idx ON
+    osm_amenity_z12_filtered(tag);
+
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_amenity_z12 CASCADE;
@@ -163,7 +179,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 12 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z12_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z12_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z12_geom_idx ON
+    osm_amenity_z12
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z12_tags_idx ON
+    osm_amenity_z12
+        USING GIN(tags);
 
 -- Zoom level 11
 DROP
@@ -185,7 +217,25 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32;
+
+
+DROP
+    INDEX IF EXISTS osm_amenity_z11_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z11_filtered_tags_idx;
+
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z11_filtered_geom_idx ON
+    osm_amenity_z11_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z11_filtered_tags_idx ON
+    osm_amenity_z11_filtered(tag);
+
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_amenity_z11 CASCADE;
@@ -230,7 +280,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z11_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z11_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z11_geom_idx ON
+    osm_amenity_z11
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z11_tags_idx ON
+    osm_amenity_z11
+        USING GIN(tags);
 
 -- Zoom level 10
 DROP
@@ -252,7 +318,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z10_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z10_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z10_filtered_geom_idx ON
+    osm_amenity_z10_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z10_filtered_tags_idx ON
+    osm_amenity_z10_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_amenity_z10 CASCADE;
@@ -297,7 +378,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z10_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z10_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z10_geom_idx ON
+    osm_amenity_z10
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z10_tags_idx ON
+    osm_amenity_z10
+        USING GIN(tags);
 
 -- Zoom level 9
 DROP
@@ -361,7 +458,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 9 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z9_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z9_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z9_geom_idx ON
+    osm_amenity_z9
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z9_tags_idx ON
+    osm_amenity_z9
+        USING GIN(tags);
 
 -- Zoom level 8
 DROP
@@ -425,7 +538,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 8 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z8_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z8_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z8_geom_idx ON
+    osm_amenity_z8
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z8_tags_idx ON
+    osm_amenity_z8
+        USING GIN(tags);
 
 -- Zoom level 7
 DROP
@@ -489,7 +618,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 7 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z7_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z7_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z7_geom_idx ON
+    osm_amenity_z7
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z7_tags_idx ON
+    osm_amenity_z7
+        USING GIN(tags);
 
 -- Zoom level 6
 DROP
@@ -553,7 +698,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 6 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z6_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z6_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z6_geom_idx ON
+    osm_amenity_z6
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z6_tags_idx ON
+    osm_amenity_z6
+        USING GIN(tags);
 
 -- Zoom level 5
 DROP
@@ -617,7 +778,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 5 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z5_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z5_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z5_geom_idx ON
+    osm_amenity_z5
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z5_tags_idx ON
+    osm_amenity_z5
+        USING GIN(tags);
 
 -- Zoom level 4
 DROP
@@ -681,7 +858,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 4 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z4_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z4_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z4_geom_idx ON
+    osm_amenity_z4
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z4_tags_idx ON
+    osm_amenity_z4
+        USING GIN(tags);
 
 -- Zoom level 3
 DROP
@@ -700,7 +893,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z3_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z3_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z3_geom_idx ON
+    osm_amenity_z3
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z3_tags_idx ON
+    osm_amenity_z3
+        USING GIN(tags);
 
 -- Zoom level 2
 DROP
@@ -719,7 +928,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z2_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z2_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z2_geom_idx ON
+    osm_amenity_z2
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z2_tags_idx ON
+    osm_amenity_z2
+        USING GIN(tags);
 
 -- Zoom level 1
 DROP
@@ -738,4 +963,21 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z1_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_amenity_z1_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z1_geom_idx ON
+    osm_amenity_z1
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_amenity_z1_tags_idx ON
+    osm_amenity_z1
+        USING GIN(tags);
+
diff --git a/basemap/layers/amenity/refresh.sql 
b/basemap/layers/amenity/refresh.sql
deleted file mode 100644
index c3a4b305e..000000000
--- a/basemap/layers/amenity/refresh.sql
+++ /dev/null
@@ -1,292 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
--- Zoom level 12
-DROP
-    INDEX IF EXISTS osm_amenity_z12_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z12_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z12_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z12_filtered_geom_idx ON
-    osm_amenity_z12_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z12_filtered_tags_idx ON
-    osm_amenity_z12_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_amenity_z12_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z12_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z12_geom_idx ON
-    osm_amenity_z12
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z12_tags_idx ON
-    osm_amenity_z12
-        USING GIN(tags);
-
--- Zoom level 11
-DROP
-    INDEX IF EXISTS osm_amenity_z11_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z11_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z11_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z11_filtered_geom_idx ON
-    osm_amenity_z11_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z11_filtered_tags_idx ON
-    osm_amenity_z11_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_amenity_z11_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z11_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z11_geom_idx ON
-    osm_amenity_z11
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z11_tags_idx ON
-    osm_amenity_z11
-        USING GIN(tags);
-
--- Zoom level 10
-DROP
-    INDEX IF EXISTS osm_amenity_z10_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z10_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z10_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z10_filtered_geom_idx ON
-    osm_amenity_z10_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z10_filtered_tags_idx ON
-    osm_amenity_z10_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_amenity_z10_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z10_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z10_geom_idx ON
-    osm_amenity_z10
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z10_tags_idx ON
-    osm_amenity_z10
-        USING GIN(tags);
-
--- Zoom level 9
-DROP
-    INDEX IF EXISTS osm_amenity_z9_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z9_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z9_geom_idx ON
-    osm_amenity_z9
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z9_tags_idx ON
-    osm_amenity_z9
-        USING GIN(tags);
-
--- Zoom level 8
-DROP
-    INDEX IF EXISTS osm_amenity_z8_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z8_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z8_geom_idx ON
-    osm_amenity_z8
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z8_tags_idx ON
-    osm_amenity_z8
-        USING GIN(tags);
-
--- Zoom level 7
-DROP
-    INDEX IF EXISTS osm_amenity_z7_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z7_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z7_geom_idx ON
-    osm_amenity_z7
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z7_tags_idx ON
-    osm_amenity_z7
-        USING GIN(tags);
-
--- Zoom level 6
-DROP
-    INDEX IF EXISTS osm_amenity_z6_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z6_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z6_geom_idx ON
-    osm_amenity_z6
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z6_tags_idx ON
-    osm_amenity_z6
-        USING GIN(tags);
-
--- Zoom level 5
-DROP
-    INDEX IF EXISTS osm_amenity_z5_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z5_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z5_geom_idx ON
-    osm_amenity_z5
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z5_tags_idx ON
-    osm_amenity_z5
-        USING GIN(tags);
-
--- Zoom level 4
-DROP
-    INDEX IF EXISTS osm_amenity_z4_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z4_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z4_geom_idx ON
-    osm_amenity_z4
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z4_tags_idx ON
-    osm_amenity_z4
-        USING GIN(tags);
-
--- Zoom level 3
-DROP
-    INDEX IF EXISTS osm_amenity_z3_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z3_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z3_geom_idx ON
-    osm_amenity_z3
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z3_tags_idx ON
-    osm_amenity_z3
-        USING GIN(tags);
-
--- Zoom level 2
-DROP
-    INDEX IF EXISTS osm_amenity_z2_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z2_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z2_geom_idx ON
-    osm_amenity_z2
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z2_tags_idx ON
-    osm_amenity_z2
-        USING GIN(tags);
-
--- Zoom level 1
-DROP
-    INDEX IF EXISTS osm_amenity_z1_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_amenity_z1_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_amenity_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z1_geom_idx ON
-    osm_amenity_z1
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_amenity_z1_tags_idx ON
-    osm_amenity_z1
-        USING GIN(tags);
diff --git a/basemap/layers/highway/create.sql 
b/basemap/layers/highway/create.sql
index 42d85abce..da214444b 100644
--- a/basemap/layers/highway/create.sql
+++ b/basemap/layers/highway/create.sql
@@ -126,7 +126,15 @@ CREATE
             'tertiary_link',
             'unclassified',
             'residential'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_highway_filtered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_filtered_geom ON
+    osm_highway_filtered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_clustered CASCADE;
@@ -143,7 +151,16 @@ CREATE
             PARTITION BY highway
         ) AS cluster
     FROM
-        osm_highway_filtered WITH NO DATA;
+        osm_highway_filtered;
+
+
+DROP
+    INDEX IF EXISTS osm_highway_clustered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_clustered_geom ON
+    osm_highway_clustered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_simplified CASCADE;
@@ -177,7 +194,15 @@ CREATE
         ) AS tags,
         geom AS geom
     FROM
-        exploded WITH NO DATA;
+        exploded;
+
+DROP
+    INDEX IF EXISTS osm_highway_simplified_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_simplified_geom ON
+    osm_highway_simplified
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z12 CASCADE;
@@ -199,7 +224,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 12 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_highway_z12_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z12_geom_idx ON
+    osm_highway_z12
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z11 CASCADE;
@@ -235,7 +268,16 @@ CREATE
             'tertiary_link',
             'unclassified',
             'residential'
-        ) WITH NO DATA;
+        );
+
+
+DROP
+    INDEX IF EXISTS osm_highway_z11_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z11_geom_idx ON
+    osm_highway_z11
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z10 CASCADE;
@@ -269,7 +311,14 @@ CREATE
             'secondary_link',
             'tertiary',
             'tertiary_link'
-        ) WITH NO DATA;
+        );
+DROP
+    INDEX IF EXISTS osm_highway_z10_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z10_geom_idx ON
+    osm_highway_z10
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z9 CASCADE;
@@ -301,7 +350,15 @@ CREATE
             'primary_link',
             'secondary',
             'secondary_link'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_highway_z9_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z9_geom_idx ON
+    osm_highway_z9
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z8 CASCADE;
@@ -328,7 +385,15 @@ CREATE
             'motorway',
             'trunk',
             'primary'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_highway_z8_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z8_geom_idx ON
+    osm_highway_z8
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z7 CASCADE;
@@ -355,7 +420,15 @@ CREATE
             'motorway',
             'trunk',
             'primary'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_highway_z7_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z7_geom_idx ON
+    osm_highway_z7
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z6 CASCADE;
@@ -382,7 +455,15 @@ CREATE
             'motorway',
             'trunk',
             'primary'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_highway_z6_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z6_geom_idx ON
+    osm_highway_z6
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z5 CASCADE;
@@ -405,7 +486,15 @@ CREATE
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 5 )), 2 )
         )
-        AND tags ->> 'highway' IN('motorway') WITH NO DATA;
+        AND tags ->> 'highway' IN('motorway');
+
+DROP
+    INDEX IF EXISTS osm_highway_z5_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z5_geom_idx ON
+    osm_highway_z5
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z4 CASCADE;
@@ -428,7 +517,15 @@ CREATE
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 4 )), 2 )
         )
-        AND tags ->> 'highway' IN('motorway') WITH NO DATA;
+        AND tags ->> 'highway' IN('motorway');
+
+DROP
+    INDEX IF EXISTS osm_highway_z4_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z4_geom_idx ON
+    osm_highway_z4
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z3 CASCADE;
@@ -451,7 +548,15 @@ CREATE
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 3 )), 2 )
         )
-        AND tags ->> 'highway' IN('motorway') WITH NO DATA;
+        AND tags ->> 'highway' IN('motorway');
+
+DROP
+    INDEX IF EXISTS osm_highway_z3_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z3_geom_idx ON
+    osm_highway_z3
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z2 CASCADE;
@@ -474,7 +579,15 @@ CREATE
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 2 )), 2 )
         )
-        AND tags ->> 'highway' IN('motorway') WITH NO DATA;
+        AND tags ->> 'highway' IN('motorway');
+
+DROP
+    INDEX IF EXISTS osm_highway_z2_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z2_geom_idx ON
+    osm_highway_z2
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_highway_z1 CASCADE;
@@ -497,4 +610,12 @@ CREATE
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 1 )), 2 )
         )
-        AND tags ->> 'highway' IN('motorway') WITH NO DATA;
+        AND tags ->> 'highway' IN('motorway');
+
+DROP
+    INDEX IF EXISTS osm_highway_z1_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_highway_z1_geom_idx ON
+    osm_highway_z1
+        USING GIST(geom);
diff --git a/basemap/layers/highway/refresh.sql 
b/basemap/layers/highway/refresh.sql
deleted file mode 100644
index 38e7e4e20..000000000
--- a/basemap/layers/highway/refresh.sql
+++ /dev/null
@@ -1,163 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_highway_filtered_geom;
-
-REFRESH MATERIALIZED VIEW osm_highway_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_filtered_geom ON
-    osm_highway_filtered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_clustered_geom;
-
-REFRESH MATERIALIZED VIEW osm_highway_clustered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_clustered_geom ON
-    osm_highway_clustered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_simplified_geom;
-
-REFRESH MATERIALIZED VIEW osm_highway_simplified;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_simplified_geom ON
-    osm_highway_simplified
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z12_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z12_geom_idx ON
-    osm_highway_z12
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z11_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z11_geom_idx ON
-    osm_highway_z11
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z10_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z10_geom_idx ON
-    osm_highway_z10
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z9_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z9_geom_idx ON
-    osm_highway_z9
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z8_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z8_geom_idx ON
-    osm_highway_z8
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z7_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z7_geom_idx ON
-    osm_highway_z7
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z6_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z6_geom_idx ON
-    osm_highway_z6
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z5_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z5_geom_idx ON
-    osm_highway_z5
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z4_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z4_geom_idx ON
-    osm_highway_z4
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z3_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z3_geom_idx ON
-    osm_highway_z3
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z2_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z2_geom_idx ON
-    osm_highway_z2
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_highway_z1_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_highway_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_highway_z1_geom_idx ON
-    osm_highway_z1
-        USING GIST(geom);
diff --git a/basemap/layers/landuse/create.sql 
b/basemap/layers/landuse/create.sql
index b7ebf65ee..fc883e272 100644
--- a/basemap/layers/landuse/create.sql
+++ b/basemap/layers/landuse/create.sql
@@ -142,7 +142,22 @@ CREATE
             'landfill',
             'quarry',
             'railway'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_landuse_z12_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z12_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z12_filtered_geom_idx ON
+    osm_landuse_z12_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z12_filtered_tags_idx ON
+    osm_landuse_z12_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_landuse_z12 CASCADE;
@@ -187,7 +202,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 12 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z12_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z12_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z12_geom_idx ON
+    osm_landuse_z12
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z12_tags_idx ON
+    osm_landuse_z12
+        USING GIN(tags);
 
 -- Zoom level 11
 DROP
@@ -209,7 +240,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z11_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z11_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z11_filtered_geom_idx ON
+    osm_landuse_z11_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z11_filtered_tags_idx ON
+    osm_landuse_z11_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_landuse_z11 CASCADE;
@@ -254,7 +300,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z11_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z11_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z11_geom_idx ON
+    osm_landuse_z11
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z11_tags_idx ON
+    osm_landuse_z11
+        USING GIN(tags);
 
 -- Zoom level 10
 DROP
@@ -276,7 +338,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z10_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z10_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z10_filtered_geom_idx ON
+    osm_landuse_z10_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z10_filtered_tags_idx ON
+    osm_landuse_z10_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_landuse_z10 CASCADE;
@@ -321,7 +398,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z10_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z10_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z10_geom_idx ON
+    osm_landuse_z10
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z10_tags_idx ON
+    osm_landuse_z10
+        USING GIN(tags);
 
 -- Zoom level 9
 DROP
@@ -385,7 +478,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 9 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z9_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z9_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z9_geom_idx ON
+    osm_landuse_z9
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z9_tags_idx ON
+    osm_landuse_z9
+        USING GIN(tags);
 
 -- Zoom level 8
 DROP
@@ -449,7 +558,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 8 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z8_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z8_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z8_geom_idx ON
+    osm_landuse_z8
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z8_tags_idx ON
+    osm_landuse_z8
+        USING GIN(tags);
 
 -- Zoom level 7
 DROP
@@ -513,7 +638,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 7 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z7_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z7_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z7_geom_idx ON
+    osm_landuse_z7
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z7_tags_idx ON
+    osm_landuse_z7
+        USING GIN(tags);
 
 -- Zoom level 6
 DROP
@@ -577,7 +718,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 6 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z6_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z6_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z6_geom_idx ON
+    osm_landuse_z6
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z6_tags_idx ON
+    osm_landuse_z6
+        USING GIN(tags);
 
 -- Zoom level 5
 DROP
@@ -641,7 +798,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 5 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z5_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z5_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z5_geom_idx ON
+    osm_landuse_z5
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z5_tags_idx ON
+    osm_landuse_z5
+        USING GIN(tags);
 
 -- Zoom level 4
 DROP
@@ -705,7 +878,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 4 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z4_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z4_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z4_geom_idx ON
+    osm_landuse_z4
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z4_tags_idx ON
+    osm_landuse_z4
+        USING GIN(tags);
 
 -- Zoom level 3
 DROP
@@ -724,7 +913,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z3_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z3_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z3_geom_idx ON
+    osm_landuse_z3
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z3_tags_idx ON
+    osm_landuse_z3
+        USING GIN(tags);
 
 -- Zoom level 2
 DROP
@@ -743,7 +948,25 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z2_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z2_tags_idx;
+
+
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z2_geom_idx ON
+    osm_landuse_z2
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z2_tags_idx ON
+    osm_landuse_z2
+        USING GIN(tags);
 
 -- Zoom level 1
 DROP
@@ -762,4 +985,20 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z1_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_landuse_z1_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z1_geom_idx ON
+    osm_landuse_z1
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_landuse_z1_tags_idx ON
+    osm_landuse_z1
+        USING GIN(tags);
diff --git a/basemap/layers/landuse/refresh.sql 
b/basemap/layers/landuse/refresh.sql
deleted file mode 100644
index 91511261b..000000000
--- a/basemap/layers/landuse/refresh.sql
+++ /dev/null
@@ -1,292 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
--- Zoom level 12
-DROP
-    INDEX IF EXISTS osm_landuse_z12_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z12_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z12_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z12_filtered_geom_idx ON
-    osm_landuse_z12_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z12_filtered_tags_idx ON
-    osm_landuse_z12_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_landuse_z12_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z12_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z12_geom_idx ON
-    osm_landuse_z12
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z12_tags_idx ON
-    osm_landuse_z12
-        USING GIN(tags);
-
--- Zoom level 11
-DROP
-    INDEX IF EXISTS osm_landuse_z11_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z11_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z11_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z11_filtered_geom_idx ON
-    osm_landuse_z11_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z11_filtered_tags_idx ON
-    osm_landuse_z11_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_landuse_z11_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z11_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z11_geom_idx ON
-    osm_landuse_z11
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z11_tags_idx ON
-    osm_landuse_z11
-        USING GIN(tags);
-
--- Zoom level 10
-DROP
-    INDEX IF EXISTS osm_landuse_z10_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z10_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z10_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z10_filtered_geom_idx ON
-    osm_landuse_z10_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z10_filtered_tags_idx ON
-    osm_landuse_z10_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_landuse_z10_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z10_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z10_geom_idx ON
-    osm_landuse_z10
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z10_tags_idx ON
-    osm_landuse_z10
-        USING GIN(tags);
-
--- Zoom level 9
-DROP
-    INDEX IF EXISTS osm_landuse_z9_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z9_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z9_geom_idx ON
-    osm_landuse_z9
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z9_tags_idx ON
-    osm_landuse_z9
-        USING GIN(tags);
-
--- Zoom level 8
-DROP
-    INDEX IF EXISTS osm_landuse_z8_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z8_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z8_geom_idx ON
-    osm_landuse_z8
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z8_tags_idx ON
-    osm_landuse_z8
-        USING GIN(tags);
-
--- Zoom level 7
-DROP
-    INDEX IF EXISTS osm_landuse_z7_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z7_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z7_geom_idx ON
-    osm_landuse_z7
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z7_tags_idx ON
-    osm_landuse_z7
-        USING GIN(tags);
-
--- Zoom level 6
-DROP
-    INDEX IF EXISTS osm_landuse_z6_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z6_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z6_geom_idx ON
-    osm_landuse_z6
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z6_tags_idx ON
-    osm_landuse_z6
-        USING GIN(tags);
-
--- Zoom level 5
-DROP
-    INDEX IF EXISTS osm_landuse_z5_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z5_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z5_geom_idx ON
-    osm_landuse_z5
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z5_tags_idx ON
-    osm_landuse_z5
-        USING GIN(tags);
-
--- Zoom level 4
-DROP
-    INDEX IF EXISTS osm_landuse_z4_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z4_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z4_geom_idx ON
-    osm_landuse_z4
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z4_tags_idx ON
-    osm_landuse_z4
-        USING GIN(tags);
-
--- Zoom level 3
-DROP
-    INDEX IF EXISTS osm_landuse_z3_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z3_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z3_geom_idx ON
-    osm_landuse_z3
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z3_tags_idx ON
-    osm_landuse_z3
-        USING GIN(tags);
-
--- Zoom level 2
-DROP
-    INDEX IF EXISTS osm_landuse_z2_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z2_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z2_geom_idx ON
-    osm_landuse_z2
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z2_tags_idx ON
-    osm_landuse_z2
-        USING GIN(tags);
-
--- Zoom level 1
-DROP
-    INDEX IF EXISTS osm_landuse_z1_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_landuse_z1_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_landuse_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z1_geom_idx ON
-    osm_landuse_z1
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_landuse_z1_tags_idx ON
-    osm_landuse_z1
-        USING GIN(tags);
diff --git a/basemap/layers/leisure/create.sql 
b/basemap/layers/leisure/create.sql
index f0c348c63..5ba4c7601 100644
--- a/basemap/layers/leisure/create.sql
+++ b/basemap/layers/leisure/create.sql
@@ -127,7 +127,22 @@ CREATE
             'stadium',
             'swimming_pool',
             'track'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_leisure_z12_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z12_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z12_filtered_geom_idx ON
+    osm_leisure_z12_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z12_filtered_tags_idx ON
+    osm_leisure_z12_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_leisure_z12 CASCADE;
@@ -172,7 +187,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 12 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z12_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z12_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z12_geom_idx ON
+    osm_leisure_z12
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z12_tags_idx ON
+    osm_leisure_z12
+        USING GIN(tags);
 
 -- Zoom level 11
 DROP
@@ -194,7 +225,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z11_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z11_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z11_filtered_geom_idx ON
+    osm_leisure_z11_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z11_filtered_tags_idx ON
+    osm_leisure_z11_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_leisure_z11 CASCADE;
@@ -239,7 +285,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z11_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z11_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z11_geom_idx ON
+    osm_leisure_z11
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z11_tags_idx ON
+    osm_leisure_z11
+        USING GIN(tags);
 
 -- Zoom level 10
 DROP
@@ -261,7 +323,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z10_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z10_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z10_filtered_geom_idx ON
+    osm_leisure_z10_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z10_filtered_tags_idx ON
+    osm_leisure_z10_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_leisure_z10 CASCADE;
@@ -306,7 +383,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z10_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z10_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z10_geom_idx ON
+    osm_leisure_z10
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z10_tags_idx ON
+    osm_leisure_z10
+        USING GIN(tags);
 
 -- Zoom level 9
 DROP
@@ -370,7 +463,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 9 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z9_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z9_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z9_geom_idx ON
+    osm_leisure_z9
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z9_tags_idx ON
+    osm_leisure_z9
+        USING GIN(tags);
 
 -- Zoom level 8
 DROP
@@ -434,7 +543,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 8 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z8_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z8_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z8_geom_idx ON
+    osm_leisure_z8
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z8_tags_idx ON
+    osm_leisure_z8
+        USING GIN(tags);
 
 -- Zoom level 7
 DROP
@@ -498,7 +623,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 7 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z7_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z7_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z7_geom_idx ON
+    osm_leisure_z7
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z7_tags_idx ON
+    osm_leisure_z7
+        USING GIN(tags);
 
 -- Zoom level 6
 DROP
@@ -562,7 +703,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 6 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z6_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z6_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z6_geom_idx ON
+    osm_leisure_z6
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z6_tags_idx ON
+    osm_leisure_z6
+        USING GIN(tags);
 
 -- Zoom level 5
 DROP
@@ -626,7 +783,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 5 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z5_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z5_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z5_geom_idx ON
+    osm_leisure_z5
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z5_tags_idx ON
+    osm_leisure_z5
+        USING GIN(tags);
 
 -- Zoom level 4
 DROP
@@ -690,7 +863,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 4 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z4_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z4_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z4_geom_idx ON
+    osm_leisure_z4
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z4_tags_idx ON
+    osm_leisure_z4
+        USING GIN(tags);
 
 -- Zoom level 3
 DROP
@@ -709,7 +898,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z3_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z3_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z3_geom_idx ON
+    osm_leisure_z3
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z3_tags_idx ON
+    osm_leisure_z3
+        USING GIN(tags);
 
 -- Zoom level 2
 DROP
@@ -728,7 +933,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z2_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z2_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z2_geom_idx ON
+    osm_leisure_z2
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z2_tags_idx ON
+    osm_leisure_z2
+        USING GIN(tags);
 
 -- Zoom level 1
 DROP
@@ -747,4 +968,20 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z1_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_leisure_z1_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z1_geom_idx ON
+    osm_leisure_z1
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_leisure_z1_tags_idx ON
+    osm_leisure_z1
+        USING GIN(tags);
diff --git a/basemap/layers/leisure/refresh.sql 
b/basemap/layers/leisure/refresh.sql
deleted file mode 100644
index 847385834..000000000
--- a/basemap/layers/leisure/refresh.sql
+++ /dev/null
@@ -1,292 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
--- Zoom level 12
-DROP
-    INDEX IF EXISTS osm_leisure_z12_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z12_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z12_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z12_filtered_geom_idx ON
-    osm_leisure_z12_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z12_filtered_tags_idx ON
-    osm_leisure_z12_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_leisure_z12_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z12_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z12_geom_idx ON
-    osm_leisure_z12
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z12_tags_idx ON
-    osm_leisure_z12
-        USING GIN(tags);
-
--- Zoom level 11
-DROP
-    INDEX IF EXISTS osm_leisure_z11_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z11_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z11_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z11_filtered_geom_idx ON
-    osm_leisure_z11_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z11_filtered_tags_idx ON
-    osm_leisure_z11_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_leisure_z11_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z11_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z11_geom_idx ON
-    osm_leisure_z11
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z11_tags_idx ON
-    osm_leisure_z11
-        USING GIN(tags);
-
--- Zoom level 10
-DROP
-    INDEX IF EXISTS osm_leisure_z10_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z10_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z10_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z10_filtered_geom_idx ON
-    osm_leisure_z10_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z10_filtered_tags_idx ON
-    osm_leisure_z10_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_leisure_z10_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z10_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z10_geom_idx ON
-    osm_leisure_z10
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z10_tags_idx ON
-    osm_leisure_z10
-        USING GIN(tags);
-
--- Zoom level 9
-DROP
-    INDEX IF EXISTS osm_leisure_z9_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z9_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z9_geom_idx ON
-    osm_leisure_z9
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z9_tags_idx ON
-    osm_leisure_z9
-        USING GIN(tags);
-
--- Zoom level 8
-DROP
-    INDEX IF EXISTS osm_leisure_z8_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z8_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z8_geom_idx ON
-    osm_leisure_z8
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z8_tags_idx ON
-    osm_leisure_z8
-        USING GIN(tags);
-
--- Zoom level 7
-DROP
-    INDEX IF EXISTS osm_leisure_z7_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z7_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z7_geom_idx ON
-    osm_leisure_z7
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z7_tags_idx ON
-    osm_leisure_z7
-        USING GIN(tags);
-
--- Zoom level 6
-DROP
-    INDEX IF EXISTS osm_leisure_z6_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z6_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z6_geom_idx ON
-    osm_leisure_z6
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z6_tags_idx ON
-    osm_leisure_z6
-        USING GIN(tags);
-
--- Zoom level 5
-DROP
-    INDEX IF EXISTS osm_leisure_z5_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z5_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z5_geom_idx ON
-    osm_leisure_z5
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z5_tags_idx ON
-    osm_leisure_z5
-        USING GIN(tags);
-
--- Zoom level 4
-DROP
-    INDEX IF EXISTS osm_leisure_z4_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z4_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z4_geom_idx ON
-    osm_leisure_z4
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z4_tags_idx ON
-    osm_leisure_z4
-        USING GIN(tags);
-
--- Zoom level 3
-DROP
-    INDEX IF EXISTS osm_leisure_z3_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z3_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z3_geom_idx ON
-    osm_leisure_z3
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z3_tags_idx ON
-    osm_leisure_z3
-        USING GIN(tags);
-
--- Zoom level 2
-DROP
-    INDEX IF EXISTS osm_leisure_z2_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z2_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z2_geom_idx ON
-    osm_leisure_z2
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z2_tags_idx ON
-    osm_leisure_z2
-        USING GIN(tags);
-
--- Zoom level 1
-DROP
-    INDEX IF EXISTS osm_leisure_z1_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_leisure_z1_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_leisure_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z1_geom_idx ON
-    osm_leisure_z1
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_leisure_z1_tags_idx ON
-    osm_leisure_z1
-        USING GIN(tags);
diff --git a/basemap/layers/member/create.sql b/basemap/layers/member/create.sql
index ec0ab1bb6..c6a6a9c32 100644
--- a/basemap/layers/member/create.sql
+++ b/basemap/layers/member/create.sql
@@ -31,4 +31,11 @@ CREATE
         geom IS NOT NULL
         AND member_type = 1
         AND tags ->> 'type' = 'multipolygon'
-        AND NOT tags ->> 'natural' = 'coastline' WITH NO DATA;
\ No newline at end of file
+        AND NOT tags ->> 'natural' = 'coastline';
+
+DROP
+    INDEX IF EXISTS osm_member_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_member_idx ON
+    osm_member(member_ref);
\ No newline at end of file
diff --git a/basemap/layers/member/refresh.sql 
b/basemap/layers/member/refresh.sql
deleted file mode 100644
index 38e755998..000000000
--- a/basemap/layers/member/refresh.sql
+++ /dev/null
@@ -1,22 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_member_idx;
-
-REFRESH MATERIALIZED VIEW osm_member;
-
-CREATE
-    INDEX IF NOT EXISTS osm_member_idx ON
-    osm_member(member_ref);
\ No newline at end of file
diff --git a/basemap/layers/natural/create.sql 
b/basemap/layers/natural/create.sql
index 319adebd7..63435322d 100644
--- a/basemap/layers/natural/create.sql
+++ b/basemap/layers/natural/create.sql
@@ -133,7 +133,22 @@ CREATE
             'bare_rock',
             'sand',
             'scree'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_natural_z12_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z12_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z12_filtered_geom_idx ON
+    osm_natural_z12_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z12_filtered_tags_idx ON
+    osm_natural_z12_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_natural_z12 CASCADE;
@@ -178,7 +193,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 12 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z12_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z12_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z12_geom_idx ON
+    osm_natural_z12
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z12_tags_idx ON
+    osm_natural_z12
+        USING GIN(tags);
 
 -- Zoom level 11
 DROP
@@ -200,7 +231,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_natural_z11_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z11_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z11_filtered_geom_idx ON
+    osm_natural_z11_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z11_filtered_tags_idx ON
+    osm_natural_z11_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_natural_z11 CASCADE;
@@ -245,7 +291,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 11 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z11_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z11_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z11_geom_idx ON
+    osm_natural_z11
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z11_tags_idx ON
+    osm_natural_z11
+        USING GIN(tags);
 
 -- Zoom level 10
 DROP
@@ -267,7 +329,22 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32;
+
+DROP
+    INDEX IF EXISTS osm_natural_z10_filtered_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z10_filtered_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z10_filtered_geom_idx ON
+    osm_natural_z10_filtered
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z10_filtered_tags_idx ON
+    osm_natural_z10_filtered(tag);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_natural_z10 CASCADE;
@@ -312,7 +389,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 10 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z10_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z10_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z10_geom_idx ON
+    osm_natural_z10
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z10_tags_idx ON
+    osm_natural_z10
+        USING GIN(tags);
 
 -- Zoom level 9
 DROP
@@ -376,7 +469,24 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 9 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z9_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z9_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z9_geom_idx ON
+    osm_natural_z9
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z9_tags_idx ON
+    osm_natural_z9
+        USING GIN(tags);
+
 
 -- Zoom level 8
 DROP
@@ -440,7 +550,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 8 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z8_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z8_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z8_geom_idx ON
+    osm_natural_z8
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z8_tags_idx ON
+    osm_natural_z8
+        USING GIN(tags);
 
 -- Zoom level 7
 DROP
@@ -504,7 +630,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 7 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z7_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z7_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z7_geom_idx ON
+    osm_natural_z7
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z7_tags_idx ON
+    osm_natural_z7
+        USING GIN(tags);
 
 -- Zoom level 6
 DROP
@@ -568,7 +710,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 6 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z6_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z6_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z6_geom_idx ON
+    osm_natural_z6
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z6_tags_idx ON
+    osm_natural_z6
+        USING GIN(tags);
 
 -- Zoom level 5
 DROP
@@ -632,7 +790,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 5 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z5_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z5_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z5_geom_idx ON
+    osm_natural_z5
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z5_tags_idx ON
+    osm_natural_z5
+        USING GIN(tags);
 
 -- Zoom level 4
 DROP
@@ -696,7 +870,23 @@ CREATE
         AND st_area(geom)> POWER( 78270 / POWER( 2, 4 ), 2 )* 32
     GROUP BY
         tag,
-        cluster WITH NO DATA;
+        cluster;
+
+DROP
+    INDEX IF EXISTS osm_natural_z4_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z4_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z4_geom_idx ON
+    osm_natural_z4
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z4_tags_idx ON
+    osm_natural_z4
+        USING GIN(tags);
 
 -- Zoom level 3
 DROP
@@ -715,7 +905,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 3 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_natural_z3_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z3_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z3_geom_idx ON
+    osm_natural_z3
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z3_tags_idx ON
+    osm_natural_z3
+        USING GIN(tags);
 
 -- Zoom level 2
 DROP
@@ -734,7 +940,23 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 2 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_natural_z2_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z2_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z2_geom_idx ON
+    osm_natural_z2
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z2_tags_idx ON
+    osm_natural_z2
+        USING GIN(tags);
 
 -- Zoom level 1
 DROP
@@ -753,4 +975,20 @@ CREATE
     WHERE
         geom IS NOT NULL
         AND NOT ST_IsEmpty(geom)
-        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16 WITH NO DATA;
+        AND st_area(geom)> POWER( 78270 / POWER( 2, 1 ), 2 )* 16;
+
+DROP
+    INDEX IF EXISTS osm_natural_z1_geom_idx;
+
+DROP
+    INDEX IF EXISTS osm_natural_z1_tags_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z1_geom_idx ON
+    osm_natural_z1
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_natural_z1_tags_idx ON
+    osm_natural_z1
+        USING GIN(tags);
diff --git a/basemap/layers/natural/refresh.sql 
b/basemap/layers/natural/refresh.sql
deleted file mode 100644
index 4d61fd264..000000000
--- a/basemap/layers/natural/refresh.sql
+++ /dev/null
@@ -1,292 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
--- Zoom level 12
-DROP
-    INDEX IF EXISTS osm_natural_z12_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z12_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z12_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z12_filtered_geom_idx ON
-    osm_natural_z12_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z12_filtered_tags_idx ON
-    osm_natural_z12_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_natural_z12_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z12_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z12_geom_idx ON
-    osm_natural_z12
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z12_tags_idx ON
-    osm_natural_z12
-        USING GIN(tags);
-
--- Zoom level 11
-DROP
-    INDEX IF EXISTS osm_natural_z11_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z11_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z11_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z11_filtered_geom_idx ON
-    osm_natural_z11_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z11_filtered_tags_idx ON
-    osm_natural_z11_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_natural_z11_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z11_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z11_geom_idx ON
-    osm_natural_z11
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z11_tags_idx ON
-    osm_natural_z11
-        USING GIN(tags);
-
--- Zoom level 10
-DROP
-    INDEX IF EXISTS osm_natural_z10_filtered_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z10_filtered_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z10_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z10_filtered_geom_idx ON
-    osm_natural_z10_filtered
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z10_filtered_tags_idx ON
-    osm_natural_z10_filtered(tag);
-
-DROP
-    INDEX IF EXISTS osm_natural_z10_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z10_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z10_geom_idx ON
-    osm_natural_z10
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z10_tags_idx ON
-    osm_natural_z10
-        USING GIN(tags);
-
--- Zoom level 9
-DROP
-    INDEX IF EXISTS osm_natural_z9_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z9_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z9_geom_idx ON
-    osm_natural_z9
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z9_tags_idx ON
-    osm_natural_z9
-        USING GIN(tags);
-
--- Zoom level 8
-DROP
-    INDEX IF EXISTS osm_natural_z8_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z8_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z8_geom_idx ON
-    osm_natural_z8
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z8_tags_idx ON
-    osm_natural_z8
-        USING GIN(tags);
-
--- Zoom level 7
-DROP
-    INDEX IF EXISTS osm_natural_z7_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z7_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z7_geom_idx ON
-    osm_natural_z7
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z7_tags_idx ON
-    osm_natural_z7
-        USING GIN(tags);
-
--- Zoom level 6
-DROP
-    INDEX IF EXISTS osm_natural_z6_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z6_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z6_geom_idx ON
-    osm_natural_z6
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z6_tags_idx ON
-    osm_natural_z6
-        USING GIN(tags);
-
--- Zoom level 5
-DROP
-    INDEX IF EXISTS osm_natural_z5_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z5_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z5_geom_idx ON
-    osm_natural_z5
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z5_tags_idx ON
-    osm_natural_z5
-        USING GIN(tags);
-
--- Zoom level 4
-DROP
-    INDEX IF EXISTS osm_natural_z4_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z4_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z4_geom_idx ON
-    osm_natural_z4
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z4_tags_idx ON
-    osm_natural_z4
-        USING GIN(tags);
-
--- Zoom level 3
-DROP
-    INDEX IF EXISTS osm_natural_z3_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z3_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z3_geom_idx ON
-    osm_natural_z3
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z3_tags_idx ON
-    osm_natural_z3
-        USING GIN(tags);
-
--- Zoom level 2
-DROP
-    INDEX IF EXISTS osm_natural_z2_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z2_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z2_geom_idx ON
-    osm_natural_z2
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z2_tags_idx ON
-    osm_natural_z2
-        USING GIN(tags);
-
--- Zoom level 1
-DROP
-    INDEX IF EXISTS osm_natural_z1_geom_idx;
-
-DROP
-    INDEX IF EXISTS osm_natural_z1_tags_idx;
-
-REFRESH MATERIALIZED VIEW osm_natural_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z1_geom_idx ON
-    osm_natural_z1
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_natural_z1_tags_idx ON
-    osm_natural_z1
-        USING GIN(tags);
diff --git a/basemap/layers/node/create.sql b/basemap/layers/node/create.sql
index 58f50dc52..ffd5f63f1 100644
--- a/basemap/layers/node/create.sql
+++ b/basemap/layers/node/create.sql
@@ -28,4 +28,20 @@ CREATE
             lon FLOAT,
             lat FLOAT,
             geom geometry(point)
-        );
\ No newline at end of file
+        );
+
+DROP
+    INDEX IF EXISTS osm_node_geom_index;
+
+DROP
+    INDEX IF EXISTS osm_node_tags_index;
+
+CREATE
+    INDEX IF NOT EXISTS osm_node_geom_index ON
+    osm_node
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_node_tags_index ON
+    osm_node
+        USING GIN(tags);
diff --git a/basemap/layers/node/refresh.sql b/basemap/layers/node/refresh.sql
deleted file mode 100644
index 0c7db66fe..000000000
--- a/basemap/layers/node/refresh.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_node_geom_index;
-
-DROP
-    INDEX IF EXISTS osm_node_tags_index;
-
-CREATE
-    INDEX IF NOT EXISTS osm_node_geom_index ON
-    osm_node
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_node_tags_index ON
-    osm_node
-        USING GIN(tags);
diff --git a/basemap/layers/ocean/create.sql b/basemap/layers/ocean/create.sql
index df7732820..a581fcf8f 100644
--- a/basemap/layers/ocean/create.sql
+++ b/basemap/layers/ocean/create.sql
@@ -36,7 +36,15 @@ CREATE
             3857
         ) AS geom
     FROM
-        water_polygons_shp WITH NO DATA;
+        water_polygons_shp;
+
+DROP
+    INDEX IF EXISTS osm_ocean_geometry_index;
+
+CREATE
+    INDEX IF NOT EXISTS osm_ocean_geometry_index ON
+    osm_ocean
+        USING gist(geom);
 
 DROP
     TABLE
@@ -62,4 +70,12 @@ CREATE
             3857
         ) AS geom
     FROM
-        simplified_water_polygons_shp WITH NO DATA;
+        simplified_water_polygons_shp;
+
+DROP
+    INDEX IF EXISTS osm_ocean_simplified_geometry_index;
+
+CREATE
+    INDEX IF NOT EXISTS osm_ocean_simplified_geometry_index ON
+    osm_ocean_simplified
+        USING gist(geom);
\ No newline at end of file
diff --git a/basemap/layers/ocean/refresh.sql b/basemap/layers/ocean/refresh.sql
deleted file mode 100644
index b1476fd89..000000000
--- a/basemap/layers/ocean/refresh.sql
+++ /dev/null
@@ -1,33 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_ocean_geometry_index;
-
-REFRESH MATERIALIZED VIEW osm_ocean;
-
-CREATE
-    INDEX IF NOT EXISTS osm_ocean_geometry_index ON
-    osm_ocean
-        USING gist(geom);
-
-DROP
-    INDEX IF EXISTS osm_ocean_simplified_geometry_index;
-
-REFRESH MATERIALIZED VIEW osm_ocean_simplified;
-
-CREATE
-    INDEX IF NOT EXISTS osm_ocean_simplified_geometry_index ON
-    osm_ocean_simplified
-        USING gist(geom);
diff --git a/basemap/layers/point/create.sql b/basemap/layers/point/create.sql
index 2463e956e..dcdc60967 100644
--- a/basemap/layers/point/create.sql
+++ b/basemap/layers/point/create.sql
@@ -108,7 +108,7 @@ CREATE
         )= 'waterfall'
         OR(
             tags ->> 'railway'
-        )= 'level_crossing' WITH NO DATA;
+        )= 'level_crossing';
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z12;
@@ -147,7 +147,7 @@ CREATE
         )= 'wilderness_hut'
         OR(
             tags ->> 'waterway'
-        )= 'waterfall' WITH NO DATA;
+        )= 'waterfall';
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z11;
@@ -182,7 +182,7 @@ CREATE
         )
         OR(
             tags ->> 'highway'
-        )= 'motorway_junction' WITH NO DATA;
+        )= 'motorway_junction';
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z10;
@@ -216,7 +216,7 @@ CREATE
         )
         OR(
             tags ->> 'highway'
-        )= 'motorway_junction' WITH NO DATA;
+        )= 'motorway_junction';
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z9;
@@ -241,7 +241,7 @@ CREATE
             'municipality',
             'city',
             'town' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z8;
@@ -266,7 +266,7 @@ CREATE
             'municipality',
             'city',
             'town' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z7;
@@ -287,7 +287,7 @@ CREATE
             'sea',
             'state',
             'county' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z6;
@@ -308,7 +308,7 @@ CREATE
             'sea',
             'state',
             'county' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z5;
@@ -329,7 +329,7 @@ CREATE
             'sea',
             'state',
             'county' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z4;
@@ -348,7 +348,7 @@ CREATE
             ARRAY [ 'country',
             'city',
             'sea' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z3;
@@ -367,7 +367,7 @@ CREATE
             ARRAY [ 'country',
             'city',
             'sea' ]
-        ) WITH NO DATA;
+        );
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z2;
@@ -382,7 +382,7 @@ CREATE
     WHERE
         (
             tags ->> 'place'
-        )= 'country' WITH NO DATA;
+        )= 'country';
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_point_z1;
@@ -397,4 +397,108 @@ CREATE
     WHERE
         (
             tags ->> 'place'
-        )= 'country' WITH NO DATA;
+        )= 'country';
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z13_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z12_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z11_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z10_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z9_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z8_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z7_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z6_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z5_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z4_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z3_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z2_index;
+
+DROP
+    INDEX IF EXISTS osm_point_geom_z1_index;
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z13_index ON
+    osm_point_z13
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z12_index ON
+    osm_point_z12
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z11_index ON
+    osm_point_z11
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z10_index ON
+    osm_point_z10
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z9_index ON
+    osm_point_z9
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z8_index ON
+    osm_point_z8
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z7_index ON
+    osm_point_z7
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z6_index ON
+    osm_point_z6
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z5_index ON
+    osm_point_z5
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z4_index ON
+    osm_point_z4
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z3_index ON
+    osm_point_z3
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z2_index ON
+    osm_point_z2
+        USING gist(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_point_geom_z1_index ON
+    osm_point_z1
+        USING gist(geom);
diff --git a/basemap/layers/point/refresh.sql b/basemap/layers/point/refresh.sql
deleted file mode 100644
index 6058abd73..000000000
--- a/basemap/layers/point/refresh.sql
+++ /dev/null
@@ -1,143 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_point_geom_z13_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z12_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z11_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z10_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z9_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z8_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z7_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z6_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z5_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z4_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z3_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z2_index;
-
-DROP
-    INDEX IF EXISTS osm_point_geom_z1_index;
-
-REFRESH MATERIALIZED VIEW osm_point_z13;
-
-REFRESH MATERIALIZED VIEW osm_point_z12;
-
-REFRESH MATERIALIZED VIEW osm_point_z11;
-
-REFRESH MATERIALIZED VIEW osm_point_z10;
-
-REFRESH MATERIALIZED VIEW osm_point_z9;
-
-REFRESH MATERIALIZED VIEW osm_point_z8;
-
-REFRESH MATERIALIZED VIEW osm_point_z7;
-
-REFRESH MATERIALIZED VIEW osm_point_z6;
-
-REFRESH MATERIALIZED VIEW osm_point_z5;
-
-REFRESH MATERIALIZED VIEW osm_point_z4;
-
-REFRESH MATERIALIZED VIEW osm_point_z3;
-
-REFRESH MATERIALIZED VIEW osm_point_z2;
-
-REFRESH MATERIALIZED VIEW osm_point_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z13_index ON
-    osm_point_z13
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z12_index ON
-    osm_point_z12
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z11_index ON
-    osm_point_z11
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z10_index ON
-    osm_point_z10
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z9_index ON
-    osm_point_z9
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z8_index ON
-    osm_point_z8
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z7_index ON
-    osm_point_z7
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z6_index ON
-    osm_point_z6
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z5_index ON
-    osm_point_z5
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z4_index ON
-    osm_point_z4
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z3_index ON
-    osm_point_z3
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z2_index ON
-    osm_point_z2
-        USING gist(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_point_geom_z1_index ON
-    osm_point_z1
-        USING gist(geom);
\ No newline at end of file
diff --git a/basemap/layers/railway/create.sql 
b/basemap/layers/railway/create.sql
index ae6e65435..434e2ea01 100644
--- a/basemap/layers/railway/create.sql
+++ b/basemap/layers/railway/create.sql
@@ -103,7 +103,15 @@ CREATE
             'subway',
             'tram'
         )
-        AND NOT tags ? 'service' WITH NO DATA;
+        AND NOT tags ? 'service';
+
+DROP
+    INDEX IF EXISTS osm_railway_filtered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_filtered_geom ON
+    osm_railway_filtered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_clustered CASCADE;
@@ -120,7 +128,15 @@ CREATE
             PARTITION BY railway
         ) AS cluster
     FROM
-        osm_railway_filtered WITH NO DATA;
+        osm_railway_filtered;
+
+DROP
+    INDEX IF EXISTS osm_railway_clustered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_clustered_geom ON
+    osm_railway_clustered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_simplified CASCADE;
@@ -154,7 +170,15 @@ CREATE
         ) AS tags,
         geom AS geom
     FROM
-        exploded WITH NO DATA;
+        exploded;
+
+DROP
+    INDEX IF EXISTS osm_railway_simplified_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_simplified_geom ON
+    osm_railway_simplified
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z12 CASCADE;
@@ -175,7 +199,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 12 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z12_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z12_geom_idx ON
+    osm_railway_z12
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z11 CASCADE;
@@ -196,7 +228,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 11 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z11_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z11_geom_idx ON
+    osm_railway_z11
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z10 CASCADE;
@@ -217,7 +257,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 10 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z10_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z10_geom_idx ON
+    osm_railway_z10
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z9 CASCADE;
@@ -238,7 +286,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 9 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z9_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z9_geom_idx ON
+    osm_railway_z9
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z8 CASCADE;
@@ -259,7 +315,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 8 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z8_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z8_geom_idx ON
+    osm_railway_z8
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z7 CASCADE;
@@ -280,7 +344,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 7 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z7_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z7_geom_idx ON
+    osm_railway_z7
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z6 CASCADE;
@@ -301,7 +373,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 6 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z6_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z6_geom_idx ON
+    osm_railway_z6
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z5 CASCADE;
@@ -322,7 +402,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 5 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z5_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z5_geom_idx ON
+    osm_railway_z5
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z4 CASCADE;
@@ -343,7 +431,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 4 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z4_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z4_geom_idx ON
+    osm_railway_z4
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z3 CASCADE;
@@ -364,7 +460,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 3 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z3_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z3_geom_idx ON
+    osm_railway_z3
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z2 CASCADE;
@@ -385,7 +489,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 2 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z2_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z2_geom_idx ON
+    osm_railway_z2
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_railway_z1 CASCADE;
@@ -406,4 +518,12 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 1 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_railway_z1_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_railway_z1_geom_idx ON
+    osm_railway_z1
+        USING GIST(geom);
diff --git a/basemap/layers/railway/refresh.sql 
b/basemap/layers/railway/refresh.sql
deleted file mode 100644
index f485acae1..000000000
--- a/basemap/layers/railway/refresh.sql
+++ /dev/null
@@ -1,163 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_railway_filtered_geom;
-
-REFRESH MATERIALIZED VIEW osm_railway_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_filtered_geom ON
-    osm_railway_filtered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_clustered_geom;
-
-REFRESH MATERIALIZED VIEW osm_railway_clustered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_clustered_geom ON
-    osm_railway_clustered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_simplified_geom;
-
-REFRESH MATERIALIZED VIEW osm_railway_simplified;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_simplified_geom ON
-    osm_railway_simplified
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z12_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z12_geom_idx ON
-    osm_railway_z12
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z11_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z11_geom_idx ON
-    osm_railway_z11
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z10_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z10_geom_idx ON
-    osm_railway_z10
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z9_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z9_geom_idx ON
-    osm_railway_z9
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z8_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z8_geom_idx ON
-    osm_railway_z8
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z7_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z7_geom_idx ON
-    osm_railway_z7
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z6_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z6_geom_idx ON
-    osm_railway_z6
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z5_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z5_geom_idx ON
-    osm_railway_z5
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z4_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z4_geom_idx ON
-    osm_railway_z4
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z3_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z3_geom_idx ON
-    osm_railway_z3
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z2_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z2_geom_idx ON
-    osm_railway_z2
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_railway_z1_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_railway_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_railway_z1_geom_idx ON
-    osm_railway_z1
-        USING GIST(geom);
diff --git a/basemap/layers/relation/create.sql 
b/basemap/layers/relation/create.sql
index 23a8f3332..3c76d508b 100644
--- a/basemap/layers/relation/create.sql
+++ b/basemap/layers/relation/create.sql
@@ -29,4 +29,20 @@ CREATE
             member_types INT [],
             member_roles text [],
             geom geometry
-        );
\ No newline at end of file
+        );
+
+DROP
+    INDEX IF EXISTS osm_relation_geom_index;
+
+DROP
+    INDEX IF EXISTS osm_relation_tags_index;
+
+CREATE
+    INDEX IF NOT EXISTS osm_relation_geom_index ON
+    osm_relation
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_relation_tags_index ON
+    osm_relation
+        USING GIN(tags);
diff --git a/basemap/layers/relation/refresh.sql 
b/basemap/layers/relation/refresh.sql
deleted file mode 100644
index d49b7f1fe..000000000
--- a/basemap/layers/relation/refresh.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_relation_geom_index;
-
-DROP
-    INDEX IF EXISTS osm_relation_tags_index;
-
-CREATE
-    INDEX IF NOT EXISTS osm_relation_geom_index ON
-    osm_relation
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_relation_tags_index ON
-    osm_relation
-        USING GIN(tags);
diff --git a/basemap/layers/route/create.sql b/basemap/layers/route/create.sql
index 5e83bfbdb..20ff603d5 100644
--- a/basemap/layers/route/create.sql
+++ b/basemap/layers/route/create.sql
@@ -109,7 +109,15 @@ CREATE
             'railway',
             'tram',
             'funicular'
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_filtered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_filtered_geom ON
+    osm_route_filtered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_clustered CASCADE;
@@ -126,7 +134,15 @@ CREATE
             PARTITION BY route
         ) AS cluster
     FROM
-        osm_route_filtered WITH NO DATA;
+        osm_route_filtered;
+
+DROP
+    INDEX IF EXISTS osm_route_clustered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_clustered_geom ON
+    osm_route_clustered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_simplified CASCADE;
@@ -160,7 +176,15 @@ CREATE
         ) AS tags,
         geom AS geom
     FROM
-        exploded WITH NO DATA;
+        exploded;
+
+DROP
+    INDEX IF EXISTS osm_route_simplified_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_simplified_geom ON
+    osm_route_simplified
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z12 CASCADE;
@@ -181,7 +205,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 12 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z12_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z12_geom_idx ON
+    osm_route_z12
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z11 CASCADE;
@@ -202,7 +234,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 11 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z11_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z11_geom_idx ON
+    osm_route_z11
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z10 CASCADE;
@@ -223,7 +263,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 10 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z10_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z10_geom_idx ON
+    osm_route_z10
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z9 CASCADE;
@@ -244,7 +292,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 9 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z9_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z9_geom_idx ON
+    osm_route_z9
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z8 CASCADE;
@@ -265,7 +321,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 8 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z8_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z8_geom_idx ON
+    osm_route_z8
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z7 CASCADE;
@@ -286,7 +350,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 7 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z7_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z7_geom_idx ON
+    osm_route_z7
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z6 CASCADE;
@@ -307,7 +379,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 6 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z6_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z6_geom_idx ON
+    osm_route_z6
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z5 CASCADE;
@@ -328,7 +408,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 5 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z5_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z5_geom_idx ON
+    osm_route_z5
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z4 CASCADE;
@@ -349,7 +437,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 4 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z4_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z4_geom_idx ON
+    osm_route_z4
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z3 CASCADE;
@@ -370,7 +466,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 3 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z3_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z3_geom_idx ON
+    osm_route_z3
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z2 CASCADE;
@@ -391,7 +495,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 2 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z2_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z2_geom_idx ON
+    osm_route_z2
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_route_z1 CASCADE;
@@ -412,4 +524,12 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 1 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_route_z1_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_route_z1_geom_idx ON
+    osm_route_z1
+        USING GIST(geom);
\ No newline at end of file
diff --git a/basemap/layers/route/refresh.sql b/basemap/layers/route/refresh.sql
deleted file mode 100644
index 09459ad41..000000000
--- a/basemap/layers/route/refresh.sql
+++ /dev/null
@@ -1,163 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_route_filtered_geom;
-
-REFRESH MATERIALIZED VIEW osm_route_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_filtered_geom ON
-    osm_route_filtered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_clustered_geom;
-
-REFRESH MATERIALIZED VIEW osm_route_clustered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_clustered_geom ON
-    osm_route_clustered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_simplified_geom;
-
-REFRESH MATERIALIZED VIEW osm_route_simplified;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_simplified_geom ON
-    osm_route_simplified
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z12_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z12_geom_idx ON
-    osm_route_z12
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z11_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z11_geom_idx ON
-    osm_route_z11
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z10_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z10_geom_idx ON
-    osm_route_z10
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z9_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z9_geom_idx ON
-    osm_route_z9
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z8_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z8_geom_idx ON
-    osm_route_z8
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z7_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z7_geom_idx ON
-    osm_route_z7
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z6_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z6_geom_idx ON
-    osm_route_z6
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z5_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z5_geom_idx ON
-    osm_route_z5
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z4_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z4_geom_idx ON
-    osm_route_z4
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z3_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z3_geom_idx ON
-    osm_route_z3
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z2_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z2_geom_idx ON
-    osm_route_z2
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_route_z1_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_route_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_route_z1_geom_idx ON
-    osm_route_z1
-        USING GIST(geom);
diff --git a/basemap/layers/waterway/create.sql 
b/basemap/layers/waterway/create.sql
index c4db91cbf..b7cba4038 100644
--- a/basemap/layers/waterway/create.sql
+++ b/basemap/layers/waterway/create.sql
@@ -104,7 +104,15 @@ CREATE
             'drain',
             'ditch'
         )
-        AND NOT tags ? 'intermittent' WITH NO DATA;
+        AND NOT tags ? 'intermittent';
+
+DROP
+    INDEX IF EXISTS osm_waterway_filtered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_filtered_geom ON
+    osm_waterway_filtered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_clustered CASCADE;
@@ -121,7 +129,15 @@ CREATE
             PARTITION BY waterway
         ) AS cluster
     FROM
-        osm_waterway_filtered WITH NO DATA;
+        osm_waterway_filtered;
+
+DROP
+    INDEX IF EXISTS osm_waterway_clustered_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_clustered_geom ON
+    osm_waterway_clustered
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_simplified CASCADE;
@@ -155,7 +171,15 @@ CREATE
         ) AS tags,
         geom AS geom
     FROM
-        exploded WITH NO DATA;
+        exploded;
+
+DROP
+    INDEX IF EXISTS osm_waterway_simplified_geom;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_simplified_geom ON
+    osm_waterway_simplified
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z12 CASCADE;
@@ -176,7 +200,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 12 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z12_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z12_geom_idx ON
+    osm_waterway_z12
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z11 CASCADE;
@@ -197,7 +229,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 11 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z11_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z11_geom_idx ON
+    osm_waterway_z11
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z10 CASCADE;
@@ -218,7 +258,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 10 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z10_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z10_geom_idx ON
+    osm_waterway_z10
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z9 CASCADE;
@@ -239,7 +287,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 9 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z9_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z9_geom_idx ON
+    osm_waterway_z9
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z8 CASCADE;
@@ -260,7 +316,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 8 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z8_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z8_geom_idx ON
+    osm_waterway_z8
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z7 CASCADE;
@@ -281,7 +345,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 7 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z7_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z7_geom_idx ON
+    osm_waterway_z7
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z6 CASCADE;
@@ -302,7 +374,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 6 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z6_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z6_geom_idx ON
+    osm_waterway_z6
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z5 CASCADE;
@@ -323,7 +403,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 5 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z5_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z5_geom_idx ON
+    osm_waterway_z5
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z4 CASCADE;
@@ -344,7 +432,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 4 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z4_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z4_geom_idx ON
+    osm_waterway_z4
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z3 CASCADE;
@@ -365,7 +461,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 3 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z3_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z3_geom_idx ON
+    osm_waterway_z3
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z2 CASCADE;
@@ -386,7 +490,15 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 2 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z2_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z2_geom_idx ON
+    osm_waterway_z2
+        USING GIST(geom);
 
 DROP
     MATERIALIZED VIEW IF EXISTS osm_waterway_z1 CASCADE;
@@ -407,4 +519,12 @@ CREATE
             st_area(
                 st_envelope(geom)
             )> POWER(( 78270 / POWER( 2, 1 )), 2 )
-        ) WITH NO DATA;
+        );
+
+DROP
+    INDEX IF EXISTS osm_waterway_z1_geom_idx;
+
+CREATE
+    INDEX IF NOT EXISTS osm_waterway_z1_geom_idx ON
+    osm_waterway_z1
+        USING GIST(geom);
diff --git a/basemap/layers/waterway/refresh.sql 
b/basemap/layers/waterway/refresh.sql
deleted file mode 100644
index d88331e44..000000000
--- a/basemap/layers/waterway/refresh.sql
+++ /dev/null
@@ -1,163 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_waterway_filtered_geom;
-
-REFRESH MATERIALIZED VIEW osm_waterway_filtered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_filtered_geom ON
-    osm_waterway_filtered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_clustered_geom;
-
-REFRESH MATERIALIZED VIEW osm_waterway_clustered;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_clustered_geom ON
-    osm_waterway_clustered
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_simplified_geom;
-
-REFRESH MATERIALIZED VIEW osm_waterway_simplified;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_simplified_geom ON
-    osm_waterway_simplified
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z12_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z12;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z12_geom_idx ON
-    osm_waterway_z12
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z11_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z11;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z11_geom_idx ON
-    osm_waterway_z11
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z10_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z10;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z10_geom_idx ON
-    osm_waterway_z10
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z9_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z9;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z9_geom_idx ON
-    osm_waterway_z9
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z8_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z8;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z8_geom_idx ON
-    osm_waterway_z8
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z7_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z7;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z7_geom_idx ON
-    osm_waterway_z7
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z6_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z6;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z6_geom_idx ON
-    osm_waterway_z6
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z5_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z5;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z5_geom_idx ON
-    osm_waterway_z5
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z4_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z4;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z4_geom_idx ON
-    osm_waterway_z4
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z3_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z3;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z3_geom_idx ON
-    osm_waterway_z3
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z2_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z2;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z2_geom_idx ON
-    osm_waterway_z2
-        USING GIST(geom);
-
-DROP
-    INDEX IF EXISTS osm_waterway_z1_geom_idx;
-
-REFRESH MATERIALIZED VIEW osm_waterway_z1;
-
-CREATE
-    INDEX IF NOT EXISTS osm_waterway_z1_geom_idx ON
-    osm_waterway_z1
-        USING GIST(geom);
diff --git a/basemap/layers/way/create.sql b/basemap/layers/way/create.sql
index ab634e58e..3b86ab144 100644
--- a/basemap/layers/way/create.sql
+++ b/basemap/layers/way/create.sql
@@ -28,3 +28,19 @@ CREATE
             nodes int8 [],
             geom geometry
         );
+
+DROP
+    INDEX IF EXISTS osm_way_geom_index;
+
+DROP
+    INDEX IF EXISTS osm_way_tags_index;
+
+CREATE
+    INDEX IF NOT EXISTS osm_way_geom_index ON
+    osm_way
+        USING GIST(geom);
+
+CREATE
+    INDEX IF NOT EXISTS osm_way_tags_index ON
+    osm_way
+        USING GIN(tags);
diff --git a/basemap/layers/way/refresh.sql b/basemap/layers/way/refresh.sql
deleted file mode 100644
index 023c9f338..000000000
--- a/basemap/layers/way/refresh.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- Licensed to the Apache Software Foundation (ASF) under one or more
--- contributor license agreements.  See the NOTICE file distributed with
--- this work for additional information regarding copyright ownership.
--- The ASF licenses this file to you under the Apache License, Version 2.0
--- (the "License"); you may not use this file except in compliance with
--- the License.  You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
-DROP
-    INDEX IF EXISTS osm_way_geom_index;
-
-DROP
-    INDEX IF EXISTS osm_way_tags_index;
-
-CREATE
-    INDEX IF NOT EXISTS osm_way_geom_index ON
-    osm_way
-        USING GIST(geom);
-
-CREATE
-    INDEX IF NOT EXISTS osm_way_tags_index ON
-    osm_way
-        USING GIN(tags);

Reply via email to