layers/transportation_name/: add roads under construction, fix SQL error (#321)

This commit is contained in:
golubev
2019-10-04 14:50:05 +03:00
parent 81c90be19b
commit 73307a610b
2 changed files with 27 additions and 21 deletions

View File

@@ -19,9 +19,9 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text,
when length(coalesce(ref, ''))>0
then 'road'
end as network,
highway_class(highway, '') AS class,
highway_class(highway, '', construction) AS class,
CASE
WHEN highway IS NOT NULL AND highway_class(highway, '') = 'path'
WHEN highway IS NOT NULL AND highway_class(highway, '', construction) = 'path'
THEN highway
ELSE NULL
END AS subclass,
@@ -70,6 +70,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text,
"tags",
ref,
highway,
construction,
network,
z_order,
layer,
@@ -78,7 +79,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text,
FROM osm_transportation_name_linestring
WHERE zoom_level = 12
AND LineLabel(zoom_level, COALESCE(NULLIF(name, ''), ref), geometry)
AND highway_class(highway, '') NOT IN ('minor', 'track', 'path')
AND highway_class(highway, '', construction) NOT IN ('minor', 'track', 'path')
AND NOT highway_is_link(highway)
UNION ALL
@@ -92,6 +93,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text,
"tags",
ref,
highway,
construction,
network,
z_order,
layer,
@@ -100,7 +102,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text,
FROM osm_transportation_name_linestring
WHERE zoom_level = 13
AND LineLabel(zoom_level, COALESCE(NULLIF(name, ''), ref), geometry)
AND highway_class(highway, '') NOT IN ('track', 'path')
AND highway_class(highway, '', construction) NOT IN ('track', 'path')
UNION ALL
-- etldoc: osm_transportation_name_linestring -> layer_transportation_name:z14_
@@ -113,6 +115,7 @@ RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text,
"tags",
ref,
highway,
construction,
network,
z_order,
layer,