From 53dc925525d0650d2474d93cb894b8a8a57248dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 13 Mar 2021 16:49:01 +0200 Subject: [PATCH] wip fix syntax errors --- IV/wm.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IV/wm.sql b/IV/wm.sql index 902f6b3..f2425ab 100644 --- a/IV/wm.sql +++ b/IV/wm.sql @@ -270,16 +270,17 @@ $$ language plpgsql; -- "Line Generalization Based on Analysis of Shape Characteristics" algorithm, -- 1998. drop function if exists ST_SimplifyWM; -create function ST_SimplifyWM(geometry geom) returns geometry as $$ +create function ST_SimplifyWM(geom geometry) returns geometry as $$ declare line geometry; geoms geometry[]; bends geometry[]; + mutated boolean; l_type text; begin l_type = st_geometrytype(geom); if l_type = 'ST_LineString' then - geoms = array(geom); + geoms = array[geom]; elseif l_type = 'ST_MultiLineString' then geoms = array((select geom from st_dump(geom) order by path[1] desc)); else