From 9918ac279f2b9bc94078f1c70477dd4a74526806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 16 Apr 2021 07:28:17 +0300 Subject: [PATCH] selfcrossing-1-rev does not overlap --- IV/mj-msc.tex | 2 +- IV/tests.sql | 4 ++-- IV/wm.sql | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/IV/mj-msc.tex b/IV/mj-msc.tex index 164ddde..4c1affe 100644 --- a/IV/mj-msc.tex +++ b/IV/mj-msc.tex @@ -115,7 +115,7 @@ Given the discussed complexities, a fine line between under-generalization found. Therein lies the complexity of generalization algorithms: all have different trade-offs. -\section{Literature review} +\section{Literature review and problematic} \label{sec:literature-review} A number of cartographic line generalization algorithms have been researched. diff --git a/IV/tests.sql b/IV/tests.sql index 520c229..042e3b1 100644 --- a/IV/tests.sql +++ b/IV/tests.sql @@ -54,7 +54,7 @@ insert into wm_figures (name, way) values ('multi-island',ST_GeomFromText('MULTI -- TODO: there is a bug and it does not go through `self_crossing` function. insert into wm_figures (name, way) values ('selfcrossing-1',ST_GeomFromText('LINESTRING(-27 180,-20 166,-21 142,-18 136,55 136,55 136,71 145,44 165,37 146,22 145,14 164,11 164,3 146,-12 146,-13 176,-18 184)')); -insert into wm_figures (name, way) values ('selfcrossing-1-rev',ST_Reverse(ST_Translate((select way from wm_figures where name='selfcrossing-1'), 60, 0))); +insert into wm_figures (name, way) values ('selfcrossing-1-rev',ST_Reverse(ST_Translate((select way from wm_figures where name='selfcrossing-1'), 0, 60))); -- Run ST_SimplifyWM in debug mode, so `wm_debug` is populated. That table @@ -170,7 +170,7 @@ begin perform assert_equals( selfcrossing1, (select st_astext( - st_translate(st_reverse(st_linemerge(st_union(way))), -60, 0) + st_translate(st_reverse(st_linemerge(st_union(way))), 0, -60) ) from (select unnest(vcrossings) way) a) ); diff --git a/IV/wm.sql b/IV/wm.sql index ecb163a..871ee6a 100644 --- a/IV/wm.sql +++ b/IV/wm.sql @@ -475,7 +475,6 @@ begin ); end if; - bends = detect_bends(lines[i], dbgname, stagenum); bends = fix_gentle_inflections(bends, dbgname, stagenum);