Fix paths and tracks in transportation layer z12 and z13 (#1334)

This PR fixes a bug that causes that `track` lines disappear at z13. This bug was introduced in https://github.com/openmaptiles/openmaptiles/pull/1190, which adds rendering of paths and tracks at z12 and z13.

Before this PR:
z12: lines with `route_rank = 1` are added (no matter what `highway`).
z13: lines with `route_rank BETWEEN 1 AND 2` and `highway = 'path'` are added.
-> tracks with `route_rank=1` are added at z12 but not at z13.

After this PR
z12: lines with `route_rank = 1` and `highway IN ('path', 'track')` are added.
z13: lines with `route_rank BETWEEN 1 AND 2` and `highway IN ('path', 'track')` are added .
-> only tracks and paths are added at z12 and z13 (which was IMHO the goal of https://github.com/openmaptiles/openmaptiles/pull/1190)

* Add only the most important paths and tracks (route_rank=1) to z12 and more important ones (route_rank between 1-2 or sac_scale or has name) to z13.
pull/1333/head^2 v3.13
Adam Laža 2022-01-05 07:28:34 +01:00 zatwierdzone przez GitHub
rodzic 7d08e5b97e
commit 2e04f83166
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -376,12 +376,11 @@ FROM (
AND
CASE WHEN zoom_level = 12 THEN
CASE WHEN transportation_filter_z12(hl.highway, hl.construction) THEN TRUE
WHEN n.route_rank = 1 THEN TRUE
WHEN hl.highway IN ('track', 'path') THEN n.route_rank = 1
END
WHEN zoom_level = 13 THEN
CASE WHEN man_made='pier' THEN NOT ST_IsClosed(hl.geometry)
WHEN hl.highway = 'path' THEN (
hl.name <> ''
WHEN hl.highway IN ('track', 'path') THEN (hl.name <> ''
OR n.route_rank BETWEEN 1 AND 2
OR hl.sac_scale <> ''
)