Fix zoom ordering (#1444)

This PR improves the behavior introduced in #1440, which inadvertently included all motorways at z4, which was unintended.  Instead, this PR provides an appropriate progression from z4 to z5 with the highest national-importance highways being rendered at z4 (including where they degrade to trunk, as in Canada), and all motorways being added to the mix at z5.
pull/1450/head
Brian Sperlongano 2022-11-28 13:19:29 -05:00 zatwierdzone przez GitHub
rodzic aa9c39ba3b
commit c4d86d44a6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 10 dodań i 8 usunięć

Wyświetl plik

@ -327,7 +327,14 @@ BEGIN
FROM osm_transportation_merge_linestring_gen_z6
WHERE
(update_id IS NULL OR id = update_id) AND
-- Current view: motorway/trunk
-- Current view: all motorways and trunks of national-importance
(highway = 'motorway'
OR construction = 'motorway'
-- Allow trunk roads that are part of a nation's most important route network to show at z4
OR highway = 'trunk' AND
network <> '' AND
network IN ('ca-transcanada','us-interstate')
) AND
ST_Length(geometry) > 500;
DELETE FROM osm_transportation_merge_linestring_gen_z4
@ -349,13 +356,8 @@ BEGIN
FROM osm_transportation_merge_linestring_gen_z5
WHERE
(update_id IS NULL OR id = update_id) AND
(highway = 'motorway'
OR construction = 'motorway'
-- Allow trunk roads that are part of a nation's most important route network to show at z4
OR highway = 'trunk' AND
network <> '' AND
network IN ('ca-transcanada','us-interstate')
) AND
-- Current view: national-importance motorways and trunks
network IN ('ca-transcanada','us-interstate') AND
ST_Length(geometry) > 1000;
END;
$$ LANGUAGE plpgsql;