mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:57:07 +00:00
Remove commented out code
This commit is contained in:
@@ -6,28 +6,6 @@ async function lines (projectId) {
|
|||||||
|
|
||||||
await pool.query("CALL set_survey($1);", [projectId]);
|
await pool.query("CALL set_survey($1);", [projectId]);
|
||||||
|
|
||||||
// const text = `
|
|
||||||
// SELECT json_build_object(
|
|
||||||
// 'type', 'FeatureCollection',
|
|
||||||
// 'features', json_agg(geojson::json)) geojson
|
|
||||||
// FROM (
|
|
||||||
// SELECT ST_AsGeoJSON(t.*) geojson
|
|
||||||
// FROM (
|
|
||||||
// SELECT
|
|
||||||
// sequence,
|
|
||||||
// line,
|
|
||||||
// min(tstamp) ts0,
|
|
||||||
// max(tstamp) ts1,
|
|
||||||
// count(point) num_points,
|
|
||||||
// ST_Transform(ST_MakeLine(fs.geometry ORDER BY tstamp), 4326) geometry
|
|
||||||
// FROM final_lines fl
|
|
||||||
// INNER JOIN final_shots fs USING (sequence)
|
|
||||||
// GROUP BY sequence
|
|
||||||
//
|
|
||||||
// ) t
|
|
||||||
// ) f;
|
|
||||||
// `;
|
|
||||||
|
|
||||||
const text = `
|
const text = `
|
||||||
SELECT ST_AsGeoJSON(flsg.*) geojson
|
SELECT ST_AsGeoJSON(flsg.*) geojson
|
||||||
FROM final_lines_summary_geometry flsg;
|
FROM final_lines_summary_geometry flsg;
|
||||||
|
|||||||
@@ -6,40 +6,6 @@ async function lines (projectId, options = {}) {
|
|||||||
|
|
||||||
await pool.query("CALL set_survey($1);", [projectId]);
|
await pool.query("CALL set_survey($1);", [projectId]);
|
||||||
|
|
||||||
// const values = [
|
|
||||||
// "bbox" in options,
|
|
||||||
// ...(options.bbox||[null, null, null, null]),
|
|
||||||
// options.limit || 5000
|
|
||||||
// ];
|
|
||||||
|
|
||||||
// const text = `
|
|
||||||
// SELECT json_build_object(
|
|
||||||
// 'type', 'FeatureCollection',
|
|
||||||
// 'features', json_agg(geojson::json)) geojson
|
|
||||||
// FROM (
|
|
||||||
// SELECT ST_AsGeoJSON(t.*) geojson
|
|
||||||
// FROM (
|
|
||||||
// SELECT
|
|
||||||
// sequence,
|
|
||||||
// line,
|
|
||||||
// min(tstamp) ts0,
|
|
||||||
// max(tstamp) ts1,
|
|
||||||
// count(point) num_points,
|
|
||||||
// ST_Transform(ST_MakeLine(rs.geometry ORDER BY tstamp), 4326) geometry
|
|
||||||
// FROM raw_lines rl
|
|
||||||
// INNER JOIN raw_shots rs USING (sequence)
|
|
||||||
// GROUP BY sequence
|
|
||||||
// ) t
|
|
||||||
// -- FIXME This restriction does not do the job properly
|
|
||||||
// -- WHERE
|
|
||||||
// -- ($1 IS true
|
|
||||||
// -- AND t.geometry && ST_MakeEnvelope($2, $3, $4, $5, 4326)
|
|
||||||
// -- )
|
|
||||||
// -- OR ($1 IS false AND true)
|
|
||||||
// -- LIMIT $6
|
|
||||||
// ) f;
|
|
||||||
// `;
|
|
||||||
|
|
||||||
const text = `
|
const text = `
|
||||||
SELECT ST_AsGeoJSON(rlsg.*) geojson
|
SELECT ST_AsGeoJSON(rlsg.*) geojson
|
||||||
FROM raw_lines_summary_geometry rlsg;
|
FROM raw_lines_summary_geometry rlsg;
|
||||||
|
|||||||
Reference in New Issue
Block a user