mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
Truncate sequence durations to second in the GIS calls
This commit is contained in:
@@ -7,8 +7,12 @@ async function lines (projectId) {
|
||||
await pool.query("CALL set_survey($1);", [projectId]);
|
||||
|
||||
const text = `
|
||||
SELECT ST_AsGeoJSON(flsg.*) geojson
|
||||
FROM final_lines_summary_geometry flsg;
|
||||
SELECT ST_AsGeoJSON(s.*) geojson
|
||||
FROM (
|
||||
SELECT
|
||||
flsg.*, date_trunc('second', flsg.duration) AS duration
|
||||
FROM final_lines_summary_geometry flsg
|
||||
) s;
|
||||
`;
|
||||
|
||||
const res = await pool.query(text);
|
||||
|
||||
@@ -7,8 +7,12 @@ async function lines (projectId, options = {}) {
|
||||
await pool.query("CALL set_survey($1);", [projectId]);
|
||||
|
||||
const text = `
|
||||
SELECT ST_AsGeoJSON(rlsg.*) geojson
|
||||
FROM raw_lines_summary_geometry rlsg;
|
||||
SELECT ST_AsGeoJSON(s.*) geojson
|
||||
FROM (
|
||||
SELECT
|
||||
rlsg.*, date_trunc('second', rlsg.duration) AS duration
|
||||
FROM raw_lines_summary_geometry rlsg
|
||||
) s;
|
||||
`;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user