From a2f2d62033fddd46d7d3b12288d5a3078e0e37c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 19 May 2021 22:57:47 +0300 Subject: [PATCH] less parentheses --- wm.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wm.sql b/wm.sql index 77d2da5..5c2e343 100644 --- a/wm.sql +++ b/wm.sql @@ -36,11 +36,11 @@ begin -- So once the p1 becomes the last vertex, the loop terminates, and the -- [p2,p1] line will not have a chance to be added. So the loop adds the last -- vertex twice, so it has a chance to become p2, and be added to the bend. - for p in ( - (select geom from st_dumppoints(line) order by path[1] asc) - union all - (select geom from st_dumppoints(line) order by path[1] desc limit 1) - ) loop + for p in + (select geom from st_dumppoints(line) order by path[1] asc) + union all + (select geom from st_dumppoints(line) order by path[1] desc limit 1) + loop p3 = p2; p2 = p1; p1 = p; @@ -250,7 +250,7 @@ declare p3 geometry; begin angle = 0; - for p0 in (select geom from st_dumppoints(bend) order by path[1] asc) loop + for p0 in select geom from st_dumppoints(bend) order by path[1] asc loop p3 = p2; p2 = p1; p1 = p0; @@ -330,7 +330,7 @@ $$ language plpgsql; create function isolated_bends(INOUT bendattrs t_bend_attrs[], dbgname text default null) as $$ declare - isolation_threshold constant real default 0.33; -- if neighbor's curvatures are within, it's isolated + isolation_threshold constant real default 0.25; -- if neighbor's curvatures are within, it's isolated this real; skip_next bool; res t_bend_attrs;