Remove commented out code

This commit is contained in:
D. Berge
2020-08-11 15:41:12 +02:00
parent c661a7849a
commit cc156ab563
2 changed files with 0 additions and 56 deletions

View File

@@ -6,28 +6,6 @@ async function lines (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 = `
SELECT ST_AsGeoJSON(flsg.*) geojson
FROM final_lines_summary_geometry flsg;

View File

@@ -6,40 +6,6 @@ async function lines (projectId, options = {}) {
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 = `
SELECT ST_AsGeoJSON(rlsg.*) geojson
FROM raw_lines_summary_geometry rlsg;