From 0184aa2066c65dc4d26af50f60b4947d33e334d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 3 May 2021 10:29:14 +0300 Subject: [PATCH] elimination unit tests --- IV/tests.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/IV/tests.sql b/IV/tests.sql index c0ff5c7..7368fab 100644 --- a/IV/tests.sql +++ b/IV/tests.sql @@ -176,3 +176,15 @@ begin ); end $$ language plpgsql; + +-- verifying bends in fig8 are eliminated like explained in the WM paper +do $$ +declare + fig8gen2 constant text default 'LINESTRING(173 12,174 10,180 8,186 8,189 6,201 5,203 11,216 16,216 6,229 3,236 2,239 6,243 8,248 6)'; + fig8gen3 constant text default 'LINESTRING(173 12,174 10,180 8,189 6,201 5,203 11,216 16,216 6,229 3,236 2,239 6,243 8,248 6)'; + eliminations geometry[]; +begin + eliminations = wm_debug_get('afigures', 'fig8'); + perform assert_equals(fig8gen2, st_astext(eliminations[2])); + perform assert_equals(fig8gen3, st_astext(eliminations[3])); +end $$ language plpgsql;