From 79f8db03f93c6db37ae4f45d6401dfc8c24d3ff9 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Mon, 1 Nov 2021 04:05:01 -0400 Subject: [PATCH] Fix blank names (#1268) This PR fixes a bug in the `waterway` layer in which empty `name_en` and `name_de` tags were being added to the tiles. `name_en` and `name_de` are legacy tags, intended to be removed in v4.0. Thus, any legacy consumers that have not yet transitioned to `name:en` and `name:de` etc are currently NOT rendering labels for these features when `name:en` and `name:de` are not tagged on the feature. Therefore there are two possible approaches: 1. Remove these tags which are not rendering anyways from the tile, which keeps the bug in place, but shouldn't matter because no data consumer has taken notice of the issue (it would probably be easier to migrate to the new tag than to post a bug report!), _and they're going to be removed eventually anyways_. That's the approach in this PR. --- layers/waterway/waterway.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/waterway/waterway.sql b/layers/waterway/waterway.sql index 22ce2a7f..c1a9e370 100644 --- a/layers/waterway/waterway.sql +++ b/layers/waterway/waterway.sql @@ -318,8 +318,8 @@ $$ SELECT geometry, class, NULLIF(name, '') AS name, - COALESCE(NULLIF(name_en, ''), name) AS name_en, - COALESCE(NULLIF(name_de, ''), name, name_en) AS name_de, + COALESCE(NULLIF(name_en, ''), NULLIF(name, '')) AS name_en, + COALESCE(NULLIF(name_de, ''), NULLIF(name, ''), NULLIF(name_en, '')) AS name_de, waterway_brunnel(is_bridge, is_tunnel) AS brunnel, is_intermittent::int AS intermittent, tags