Make sure at least very basic motorway junctions are shown

pull/367/head
lukasmartinelli 2016-06-28 20:22:23 +02:00
rodzic 3cf42393a6
commit 90099273e6
3 zmienionych plików z 19 dodań i 12 usunięć

Wyświetl plik

@ -955,12 +955,9 @@ Layer:
name,
NULLIF(ref, '') AS ref,
NULLIF(char_length(ref), 0) AS reflen,
type,
road_class(type, NULL, NULL) AS class
junction_type(type) AS type,
road_type_class(junction_type(type)) AS class
FROM (
SELECT * FROM motorway_junction_z11
WHERE z(!scale_denominator!) = 11
UNION ALL
SELECT * FROM motorway_junction_z12toz14
WHERE z(!scale_denominator!) BETWEEN 12 AND 14
) AS t

Wyświetl plik

@ -490,6 +490,12 @@ tables:
- name: name
key: name
type: string
mapping:
highway:
- motorway_junction
filters:
exclude_tags:
- [ "ref", "__nil__" ]
road_geometry:
type: geometry
fields:

Wyświetl plik

@ -1,9 +1,13 @@
CREATE OR REPLACE VIEW motorway_junction_z11 AS
SELECT id AS osm_id, type, ref, name, geometry
FROM osm_motorway_junction_point
WHERE ref <> '' AND type <> 'trunk';
CREATE OR REPLACE VIEW motorway_junction_z12toz14 AS
SELECT id AS osm_id, type, ref, name, geometry
FROM osm_motorway_junction_point
WHERE ref <> '';
FROM osm_motorway_junction_point;
CREATE OR REPLACE FUNCTION junction_type(type VARCHAR) RETURNS VARCHAR
AS $$
BEGIN
RETURN CASE
WHEN type = 'motorway_junction' THEN 'motorway'
ELSE type
END;
END;
$$ LANGUAGE plpgsql IMMUTABLE;