From 6e502de74b5f424b8e8d5d0a2730a3dfdd9f688c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 21 Mar 2021 16:55:17 +0200 Subject: [PATCH] fix simple geometries --- IV/tests-integration.sql | 2 +- IV/wm.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IV/tests-integration.sql b/IV/tests-integration.sql index 3d93e8b..cc431ee 100644 --- a/IV/tests-integration.sql +++ b/IV/tests-integration.sql @@ -2,4 +2,4 @@ drop table if exists agg_rivers_wm; create table agg_rivers_wm (name text, way geometry); -insert into agg_rivers_wm (name, way) select name, ST_SimplifyWM_DEBUG(way) from agg_rivers where name='VisinĨia'; +insert into agg_rivers_wm (name, way) select name, ST_SimplifyWM_DEBUG(way) from agg_rivers; diff --git a/IV/wm.sql b/IV/wm.sql index 1541a13..83619e3 100644 --- a/IV/wm.sql +++ b/IV/wm.sql @@ -298,7 +298,7 @@ begin end loop; if l_type = 'ST_LineString' then - return bends[1]; + return st_linemerge(st_union(bends)); elseif l_type = 'ST_MultiLineString' then return st_union(bends); end if; @@ -351,7 +351,7 @@ begin end loop; if l_type = 'ST_LineString' then - return bends[1]; + return st_linemerge(st_union(bends)); elseif l_type = 'ST_MultiLineString' then return st_union(bends); end if;