From aaa68048d9fbb54653430fb94c9c17c2343e2ab7 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Wed, 13 Oct 2021 14:43:14 -0400 Subject: [PATCH] Remove unneeded toll code (#1262) This PR removes unneeded `CASE` clauses which converts `toll` tags to booleans. However, the `toll` tag is already mapped as a boolean by imposm, therefore this processing can be simplified. --- layers/transportation/transportation.sql | 2 +- layers/transportation/update_transportation_merge.sql | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/layers/transportation/transportation.sql b/layers/transportation/transportation.sql index a689f0b8..1b2f2d86 100644 --- a/layers/transportation/transportation.sql +++ b/layers/transportation/transportation.sql @@ -340,7 +340,7 @@ FROM ( public_transport, service_value(service) AS service, CASE WHEN access IN ('private', 'no') THEN 'no' END AS access, - CASE WHEN toll='yes' THEN true ELSE NULL::boolean END AS toll, + toll, is_bridge, is_tunnel, is_ford, diff --git a/layers/transportation/update_transportation_merge.sql b/layers/transportation/update_transportation_merge.sql index be6b6af3..d9346f04 100644 --- a/layers/transportation/update_transportation_merge.sql +++ b/layers/transportation/update_transportation_merge.sql @@ -32,9 +32,7 @@ SELECT (ST_Dump(ST_LineMerge(ST_Collect(geometry)))).geom AS geometry, CASE WHEN access IN ('private', 'no') THEN 'no' ELSE NULL::text END AS access, - CASE - WHEN toll = 'yes' THEN true - ELSE false END AS toll, + toll, layer FROM osm_highway_linestring_gen_z11 -- mapping.yaml pre-filter: motorway/trunk/primary/secondary/tertiary, with _link variants, construction, ST_IsValid()