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.
This commit is contained in:
Brian Sperlongano 2021-11-01 04:05:01 -04:00 committed by GitHub
parent c7e7fae9ee
commit 79f8db03f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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