datarttu / sujuikoDB

Database backend for transit network & observation data.
MIT License
1 stars 1 forks source link

Collect journeys into linestrings in a view #118

Closed datarttu closed 3 years ago

datarttu commented 3 years ago
SELECT 
  jr.*,
  hp.geom
FROM obs.journey AS jr
INNER JOIN (
  SELECT jrnid, ST_MakeLine(geom ORDER BY tst) AS geom
  FROM obs.hfp_point
  GROUP BY jrnid
) AS hp
  ON (jr.jrnid = hp.jrnid)

to inspect LINESTRING geometries by journeys and journey attributes