From de2f538ef505c0ab11cf3bc8dd056d037c0fea1a Mon Sep 17 00:00:00 2001 From: Lukas Martinelli Date: Mon, 28 Nov 2016 11:09:50 +0000 Subject: [PATCH] Use new classes in transport_name and add network --- layers/transportation_name/layer.sql | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layers/transportation_name/layer.sql b/layers/transportation_name/layer.sql index 0e435bc..7afbcd8 100644 --- a/layers/transportation_name/layer.sql +++ b/layers/transportation_name/layer.sql @@ -3,10 +3,12 @@ -- etldoc: label="layer_transportation_name | z8 | z9 | z10 | z11 | z12| z13| z14_" ] ; CREATE OR REPLACE FUNCTION layer_transportation_name(bbox geometry, zoom_level integer) -RETURNS TABLE(osm_id bigint, geometry geometry, name text, ref text, ref_length int, class text, subclass text) AS $$ +RETURNS TABLE(osm_id bigint, geometry geometry, name text, ref text, ref_length int, network text, class text, subclass text) AS $$ SELECT osm_id, geometry, name, NULLIF(ref, ''), NULLIF(LENGTH(ref), 0) AS ref_length, - to_highway_class(highway) AS class, highway AS subclass + --TODO: The road network of the road is not yet implemented + NULL::text AS network, + highway_class(highway) AS class, highway AS subclass FROM ( -- etldoc: osm_transportation_name_linestring_gen3 -> layer_transportation_name:z8 @@ -29,7 +31,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, ref text, ref_length SELECT * FROM osm_transportation_name_linestring WHERE zoom_level = 12 AND LineLabel(zoom_level, COALESCE(NULLIF(name, ''), ref), geometry) - AND to_highway_class(highway) NOT IN ('minor_road', 'path') + AND highway_class(highway) NOT IN ('minor', 'track', 'path') AND NOT highway_is_link(highway) UNION ALL @@ -37,7 +39,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, ref text, ref_length SELECT * FROM osm_transportation_name_linestring WHERE zoom_level = 13 AND LineLabel(zoom_level, COALESCE(NULLIF(name, ''), ref), geometry) - AND to_highway_class(highway) <> 'path' + AND highway_class(highway) NOT IN ('track', 'path') UNION ALL -- etldoc: osm_transportation_name_linestring -> layer_transportation_name:z14_