Implement aerialway labels (#1309)

This PR adds labels to `aerialway` linestrings after zoom level 12. I roughly followed PR https://github.com/openmaptiles/openmaptiles/pull/1179

These are useful in ski resorts and should not inflate the size of the tiles by much as aerialways are rare:
![Screenshot from 2021-11-18 12-18-58](https://user-images.githubusercontent.com/632493/142680225-1875904b-d146-4932-8a22-8c36919b875d.png)


Co-authored-by: Tomas Pohanka <TomPohys@gmail.com>
pull/1281/head
Nicholas Skehin 2021-11-26 09:16:41 +00:00 zatwierdzone przez GitHub
rodzic 7f23feab88
commit 207396269e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 26 dodań i 1 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 284 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 283 KiB

Wyświetl plik

@ -110,7 +110,7 @@ FROM (
AND NOT highway_is_link(highway)
AND
CASE WHEN highway_class(highway, NULL::text, NULL::text) NOT IN ('path', 'minor') THEN TRUE
WHEN highway IN ('unclassified', 'residential', 'shipway') THEN TRUE
WHEN highway IN ('aerialway', 'unclassified', 'residential', 'shipway') THEN TRUE
WHEN route_rank = 1 THEN TRUE END
UNION ALL

Wyświetl plik

@ -5,6 +5,7 @@
-- etldoc: osm_transportation_name_network -> osm_transportation_name_linestring
-- etldoc: osm_shipway_linestring -> osm_transportation_name_linestring
-- etldoc: osm_aerialway_linestring -> osm_transportation_name_linestring
CREATE TABLE IF NOT EXISTS osm_transportation_name_linestring AS
SELECT (ST_Dump(geometry)).geom AS geometry,
tags,
@ -65,6 +66,30 @@ FROM (
FROM osm_shipway_linestring
WHERE name <> ''
GROUP BY name, name_en, name_de, tags, subclass, "level", layer
UNION ALL
SELECT ST_LineMerge(ST_Collect(geometry)) AS geometry,
transportation_name_tags(NULL::geometry, tags, name, name_en, name_de) AS tags,
NULL AS ref,
'aerialway' AS highway,
aerialway AS subclass,
NULL AS brunnel,
NULL AS sac_scale,
NULL::int AS level,
layer,
NULL AS indoor,
NULL AS network_type,
NULL AS route_1,
NULL AS route_2,
NULL AS route_3,
NULL AS route_4,
NULL AS route_5,
NULL AS route_6,
min(z_order) AS z_order,
NULL::int AS route_rank
FROM osm_aerialway_linestring
WHERE name <> ''
GROUP BY name, name_en, name_de, tags, subclass, "level", layer
) AS highway_union
;
CREATE INDEX IF NOT EXISTS osm_transportation_name_linestring_name_ref_idx ON osm_transportation_name_linestring (coalesce(tags->'name', ''), coalesce(ref, ''));