Add new layer to serve highway=motorway_junction nodes (#1119)
This PR adds a layer for `highway=motorway_junction` features. This implementation of highway exits in the transportation_name layer add to the existing layer table structure, and renames the internal column name from "construction" (which was already overloaded with non-construction usages) to "subclass", which will be less confusing to future developers. The string 'junction' is used as the universal sub-class for highway exits. A new documentation PR has been opened at openmaptiles/www.openmaptiles.org#69 to reflect these changes in the documentation.
This commit is contained in:
committed by
GitHub
parent
8d91cb3d94
commit
79c2ec929d
@@ -37,10 +37,11 @@ SELECT osm_id,
|
||||
WHEN length(coalesce(ref, '')) > 0
|
||||
THEN 'road'
|
||||
END AS network,
|
||||
highway_class(highway, '', construction) AS class,
|
||||
highway_class(highway, '', subclass) AS class,
|
||||
CASE
|
||||
WHEN highway IS NOT NULL AND highway_class(highway, '', construction) = 'path'
|
||||
WHEN highway IS NOT NULL AND highway_class(highway, '', subclass) = 'path'
|
||||
THEN highway
|
||||
ELSE subclass
|
||||
END AS subclass,
|
||||
brunnel,
|
||||
NULLIF(layer, 0) AS layer,
|
||||
@@ -95,7 +96,7 @@ FROM (
|
||||
"tags",
|
||||
ref,
|
||||
highway,
|
||||
construction,
|
||||
subclass,
|
||||
brunnel,
|
||||
network,
|
||||
z_order,
|
||||
@@ -105,7 +106,7 @@ FROM (
|
||||
FROM osm_transportation_name_linestring
|
||||
WHERE zoom_level = 12
|
||||
AND LineLabel(zoom_level, COALESCE(name, ref), geometry)
|
||||
AND highway_class(highway, '', construction) NOT IN ('minor', 'track', 'path')
|
||||
AND highway_class(highway, '', subclass) NOT IN ('minor', 'track', 'path')
|
||||
AND NOT highway_is_link(highway)
|
||||
UNION ALL
|
||||
|
||||
@@ -118,7 +119,7 @@ FROM (
|
||||
"tags",
|
||||
ref,
|
||||
highway,
|
||||
construction,
|
||||
subclass,
|
||||
brunnel,
|
||||
network,
|
||||
z_order,
|
||||
@@ -128,7 +129,7 @@ FROM (
|
||||
FROM osm_transportation_name_linestring
|
||||
WHERE zoom_level = 13
|
||||
AND LineLabel(zoom_level, COALESCE(name, ref), geometry)
|
||||
AND highway_class(highway, '', construction) NOT IN ('track', 'path')
|
||||
AND highway_class(highway, '', subclass) NOT IN ('track', 'path')
|
||||
UNION ALL
|
||||
|
||||
-- etldoc: osm_transportation_name_linestring -> layer_transportation_name:z14_
|
||||
@@ -140,7 +141,7 @@ FROM (
|
||||
"tags",
|
||||
ref,
|
||||
highway,
|
||||
construction,
|
||||
subclass,
|
||||
brunnel,
|
||||
network,
|
||||
z_order,
|
||||
@@ -149,6 +150,32 @@ FROM (
|
||||
indoor
|
||||
FROM osm_transportation_name_linestring
|
||||
WHERE zoom_level >= 14
|
||||
UNION ALL
|
||||
|
||||
-- etldoc: osm_highway_point -> layer_transportation_name:z10
|
||||
SELECT
|
||||
p.geometry,
|
||||
p.osm_id,
|
||||
p.name,
|
||||
p.name_en,
|
||||
p.name_de,
|
||||
p.tags,
|
||||
p.tags->'ref',
|
||||
(
|
||||
SELECT highest_highway(l.tags->'highway')
|
||||
FROM osm_highway_linestring l
|
||||
WHERE ST_Intersects(p.geometry,l.geometry)
|
||||
) AS class,
|
||||
'junction'::text AS subclass,
|
||||
NULL AS brunnel,
|
||||
NULL AS network,
|
||||
z_order,
|
||||
layer,
|
||||
NULL::int AS level,
|
||||
NULL::boolean AS indoor
|
||||
FROM osm_highway_point p
|
||||
WHERE highway = 'motorway_junction' AND zoom_level >= 10
|
||||
|
||||
) AS zoom_levels
|
||||
WHERE geometry && bbox
|
||||
ORDER BY z_order ASC;
|
||||
|
||||
Reference in New Issue
Block a user