From 829f28d27be3ae7ac7a0a8264caee9eca7470c6b Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Tue, 19 Oct 2021 10:31:51 -0400 Subject: [PATCH] Fix logic error in transportation layer filter (#1270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes a bug in the `WHERE` clauses in the transportation layer generalization tables for zoom 10. The intended behavior of the layer is to suppress `highway=tertiary` and `highway=tertiary_link` at zoom 10 and lower. However, due to this bug, these objects were not suppressed as intended, because an `OR` was used in the SQL where an `AND` was needed instead. This bug was inadvertently introduced in #1172 😞 --- layers/transportation/update_transportation_merge.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/transportation/update_transportation_merge.sql b/layers/transportation/update_transportation_merge.sql index d9346f04..639ff277 100644 --- a/layers/transportation/update_transportation_merge.sql +++ b/layers/transportation/update_transportation_merge.sql @@ -62,7 +62,7 @@ SELECT ST_Simplify(geometry, ZRes(12)) AS geometry, layer FROM osm_transportation_merge_linestring_gen_z11 WHERE highway NOT IN ('tertiary', 'tertiary_link') - OR construction NOT IN ('tertiary', 'tertiary_link') + AND construction NOT IN ('tertiary', 'tertiary_link') ) /* DELAY_MATERIALIZED_VIEW_CREATION */; CREATE INDEX IF NOT EXISTS osm_transportation_merge_linestring_gen_z10_geometry_idx ON osm_transportation_merge_linestring_gen_z10 USING gist (geometry);