You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql/routing/create_routing_schema.sql
+32-8Lines changed: 32 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,8 @@ COMMENT ON COLUMN :schema.infrastructure_source.infrastructure_source_name IS
46
46
INSERT INTO :schema.infrastructure_source (infrastructure_source_id, infrastructure_source_name, description) VALUES
47
47
(1, 'digiroad_r_mml', 'Infrastructure links from the MML Maastotietokanta. The data is from the Digiroad R export and has been made available by Finnish Transport Infrastructure Agency (https://vayla.fi)'),
48
48
(2, 'digiroad_r_supplementary', 'Digiroad''s supplementary infrastructure links. The data is from the Digiroad R export and has been made available by Finnish Transport Infrastructure Agency (https://vayla.fi)'),
49
-
(100, 'hsl_fixup', 'HSL''s infrastructure link and stop point customisations on top of Digiroad infrastructure network');
49
+
(100, 'hsl_fixup', 'HSL''s infrastructure link and stop point customisations on top of Digiroad infrastructure network'),
50
+
(200, 'hsl_tram', 'HSL''s tram infrastructure links derived from the MML tram network');
50
51
51
52
--
52
53
-- Import infrastructure links
@@ -88,7 +89,24 @@ WHERE
88
89
-- 15, -- Erikoiskuljetusyhteys puomilla
89
90
21, -- Lossi
90
91
99-- Ei tietoa (esiintyy vain rakenteilla olevilla tielinkeillä)
91
-
);
92
+
)
93
+
UNION ALL
94
+
-- Tram infrastructure links from the HSL tram network. These are imported
95
+
-- separately from Digiroad links and are therefore not affected by the
96
+
-- GeoPackage fixup layer, which applies to Digiroad (bus) links only.
97
+
SELECT
98
+
t.id::bigintAS infrastructure_link_id,
99
+
isrc.infrastructure_source_id,
100
+
t.link_id::textAS external_link_id,
101
+
dir.traffic_flow_direction_type,
102
+
NULLAS municipality_code,
103
+
NULLAS external_link_type,
104
+
3AS external_link_state,
105
+
NULLAS name,
106
+
ST_Force3D(t.geom) AS geom_3d
107
+
FROM :source_schema.hsl_tram_linkki t
108
+
INNER JOIN :schema.traffic_flow_direction dir ONdir.traffic_flow_direction_type=t.ajosuunta
0 commit comments