[WIP] Expanded road route attributes (#1620)
This PR replaces the `route_N` attribute scheme with individual attributes for name and colour on routes. Thus you will have: * `route_N_network` to hold the route `network` value * `route_N_ref` to hold the route `ref` value * `route_N_name` to hold the route `name` value * `route_N_colour` to hold the route `colour` or `ref:colour` value
This commit is contained in:
committed by
GitHub
parent
ee8259ced5
commit
b3c32321a3
@@ -4,26 +4,44 @@
|
||||
CREATE OR REPLACE FUNCTION layer_transportation_name(bbox geometry, zoom_level integer)
|
||||
RETURNS TABLE
|
||||
(
|
||||
geometry geometry,
|
||||
name text,
|
||||
name_en text,
|
||||
name_de text,
|
||||
tags hstore,
|
||||
ref text,
|
||||
ref_length int,
|
||||
network text,
|
||||
route_1 text,
|
||||
route_2 text,
|
||||
route_3 text,
|
||||
route_4 text,
|
||||
route_5 text,
|
||||
route_6 text,
|
||||
class text,
|
||||
subclass text,
|
||||
brunnel text,
|
||||
layer int,
|
||||
level int,
|
||||
indoor int
|
||||
geometry geometry,
|
||||
name text,
|
||||
name_en text,
|
||||
name_de text,
|
||||
tags hstore,
|
||||
ref text,
|
||||
ref_length int,
|
||||
network text,
|
||||
route_1_network text,
|
||||
route_1_ref text,
|
||||
route_1_name text,
|
||||
route_1_colour text,
|
||||
route_2_network text,
|
||||
route_2_ref text,
|
||||
route_2_name text,
|
||||
route_2_colour text,
|
||||
route_3_network text,
|
||||
route_3_ref text,
|
||||
route_3_name text,
|
||||
route_3_colour text,
|
||||
route_4_network text,
|
||||
route_4_ref text,
|
||||
route_4_name text,
|
||||
route_4_colour text,
|
||||
route_5_network text,
|
||||
route_5_ref text,
|
||||
route_5_name text,
|
||||
route_5_colour text,
|
||||
route_6_network text,
|
||||
route_6_ref text,
|
||||
route_6_name text,
|
||||
route_6_colour text,
|
||||
class text,
|
||||
subclass text,
|
||||
brunnel text,
|
||||
layer int,
|
||||
level int,
|
||||
indoor int
|
||||
)
|
||||
AS
|
||||
$$
|
||||
@@ -40,7 +58,35 @@ SELECT geometry,
|
||||
WHEN length(coalesce(ref, '')) > 0
|
||||
THEN 'road'
|
||||
END AS network,
|
||||
route_1, route_2, route_3, route_4, route_5, route_6,
|
||||
route_1->'network' AS route_1_network,
|
||||
route_1->'ref' AS route_1_ref,
|
||||
route_1->'name' AS route_1_name,
|
||||
route_1->'colour' AS route_1_colour,
|
||||
|
||||
route_2->'network' AS route_2_network,
|
||||
route_2->'ref' AS route_2_ref,
|
||||
route_2->'name' AS route_2_name,
|
||||
route_2->'colour' AS route_2_colour,
|
||||
|
||||
route_3->'network' AS route_3_network,
|
||||
route_3->'ref' AS route_3_ref,
|
||||
route_3->'name' AS route_3_name,
|
||||
route_3->'colour' AS route_3_colour,
|
||||
|
||||
route_4->'network' AS route_4_network,
|
||||
route_4->'ref' AS route_4_ref,
|
||||
route_4->'name' AS route_4_name,
|
||||
route_4->'colour' AS route_4_colour,
|
||||
|
||||
route_5->'network' AS route_5_network,
|
||||
route_5->'ref' AS route_5_ref,
|
||||
route_5->'name' AS route_5_name,
|
||||
route_5->'colour' AS route_5_colour,
|
||||
|
||||
route_6->'network' AS route_6_network,
|
||||
route_6->'ref' AS route_6_ref,
|
||||
route_6->'name' AS route_6_name,
|
||||
route_6->'colour' AS route_6_colour,
|
||||
highway_class(highway, '', subclass) AS class,
|
||||
CASE
|
||||
WHEN highway IS NOT NULL AND highway_class(highway, '', subclass) = 'path'
|
||||
@@ -225,12 +271,12 @@ FROM (
|
||||
'junction'::text AS subclass,
|
||||
NULL AS brunnel,
|
||||
NULL AS network,
|
||||
NULL::text AS route_1,
|
||||
NULL::text AS route_2,
|
||||
NULL::text AS route_3,
|
||||
NULL::text AS route_4,
|
||||
NULL::text AS route_5,
|
||||
NULL::text AS route_6,
|
||||
NULL::hstore AS route_1,
|
||||
NULL::hstore AS route_2,
|
||||
NULL::hstore AS route_3,
|
||||
NULL::hstore AS route_4,
|
||||
NULL::hstore AS route_5,
|
||||
NULL::hstore AS route_6,
|
||||
z_order,
|
||||
layer,
|
||||
NULL::int AS level,
|
||||
|
||||
Reference in New Issue
Block a user