Adapt API GIS functions to latest database schema

This commit is contained in:
D. Berge
2020-08-10 23:02:58 +02:00
parent 9c58ec30b5
commit 40f25287cb
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ async function points (projectId, options = {}) {
FROM (
SELECT ST_AsGeoJSON(t.*) geojson
FROM (
SELECT line, point, sequence, objref, tstamp, ST_Transform(geometry, 4326) geometry
SELECT fl.line sailline, fs.line, point, sequence, objref, tstamp, ST_Transform(geometry, 4326) geometry
FROM final_lines fl
INNER JOIN final_shots fs USING (sequence)
WHERE

View File

@@ -45,7 +45,7 @@ async function lines (projectId, options = {}) {
FROM (
SELECT
sequence,
line,
rl.line,
min(tstamp) ts0,
max(tstamp) ts1,
count(point) num_points,
@@ -82,7 +82,7 @@ async function points (projectId, options = {}) {
FROM (
SELECT ST_AsGeoJSON(t.*) geojson
FROM (
SELECT line, point, sequence, objref, tstamp, ST_Transform(geometry, 4326) geometry
SELECT rl.line sailline, rs.line, point, sequence, objref, tstamp, ST_Transform(geometry, 4326) geometry
FROM raw_lines rl
INNER JOIN raw_shots rs USING (sequence)
WHERE