Update brunnel aggregation to avoid splitting highways (#1141)
Fixes #1131 This change does the following: 1. Excludes roads from `transportation_name` that don't have a `name` or a `ref` 2. Updates the road name merging logic to exclude changes in `brunnel` status. This will ensure that minor bridges don't disrupt the continuity of named roads as the map zooms out. 3. The `brunnel` tag will now only be set when a bridge or tunnel is distinctly named. Distinctly named is defined as "has a different name from the road on either side". This example shows an unnamed interstate highway rendered as a continuous feature at low zoom. This road has many small bridges along its length:  This example shows a named bridge rendered with `brunnel` tag set: 
This commit is contained in:
parent
197ea39ae3
commit
3c15679555
@ -79,14 +79,17 @@ FROM (
|
||||
ref,
|
||||
highway,
|
||||
subclass,
|
||||
brunnel,
|
||||
CASE WHEN COUNT(*) = COUNT(brunnel) AND MAX(brunnel) = MIN(brunnel)
|
||||
THEN MAX(brunnel)
|
||||
ELSE NULL::text END AS brunnel,
|
||||
"level",
|
||||
layer,
|
||||
indoor,
|
||||
network_type,
|
||||
min(z_order) AS z_order
|
||||
FROM osm_transportation_name_network
|
||||
GROUP BY name, name_en, name_de, tags, ref, highway, subclass, brunnel, "level", layer, indoor, network_type
|
||||
WHERE name <> '' OR ref <> ''
|
||||
GROUP BY name, name_en, name_de, tags, ref, highway, subclass, "level", layer, indoor, network_type
|
||||
) AS highway_union
|
||||
;
|
||||
CREATE INDEX IF NOT EXISTS osm_transportation_name_linestring_name_ref_idx ON osm_transportation_name_linestring (coalesce(name, ''), coalesce(ref, ''));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user