mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
@@ -17,13 +17,16 @@ async function list (projectId, opts = {}) {
|
||||
last_value(point) OVER w lsp,
|
||||
count(point) OVER w num_points,
|
||||
-- ST_MakeLine(first_value(geometry) OVER w, last_value(geometry) over w) geometry,
|
||||
ST_Distance(first_value(geometry) OVER w, last_value(geometry) over w) length,
|
||||
ST_Azimuth(first_value(geometry) OVER w, last_value(geometry) over w)*180/pi() azimuth
|
||||
ST_Distance(first_value(pp.geometry) OVER w, last_value(pp.geometry) over w) length,
|
||||
ST_Azimuth(first_value(pp.geometry) OVER w, last_value(pp.geometry) over w)*180/pi() azimuth
|
||||
FROM preplot_points pp
|
||||
WHERE class = 'V'
|
||||
INNER JOIN preplot_lines pl USING (line)
|
||||
WHERE pp.class = 'V'
|
||||
WINDOW w AS (
|
||||
PARTITION BY line
|
||||
ORDER BY point
|
||||
ORDER BY
|
||||
CASE WHEN pl.incr THEN point END ASC,
|
||||
CASE WHEN pl.incr THEN point END DESC
|
||||
ROWS BETWEEN
|
||||
UNBOUNDED PRECEDING
|
||||
AND UNBOUNDED FOLLOWING
|
||||
|
||||
Reference in New Issue
Block a user