selfcrossing-1-rev does not overlap

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:48 +03:00 committed by Motiejus Jakštys
parent 9b36dc5cb2
commit 6cefc87b19
3 changed files with 3 additions and 4 deletions

View File

@ -115,7 +115,7 @@ Given the discussed complexities, a fine line between under-generalization
found. Therein lies the complexity of generalization algorithms: all have found. Therein lies the complexity of generalization algorithms: all have
different trade-offs. different trade-offs.
\section{Literature review} \section{Literature review and problematic}
\label{sec:literature-review} \label{sec:literature-review}
A number of cartographic line generalization algorithms have been researched. A number of cartographic line generalization algorithms have been researched.

View File

@ -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. -- 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',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 -- Run ST_SimplifyWM in debug mode, so `wm_debug` is populated. That table
@ -170,7 +170,7 @@ begin
perform assert_equals( perform assert_equals(
selfcrossing1, selfcrossing1,
(select st_astext( (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) ) from (select unnest(vcrossings) way) a)
); );

1
wm.sql
View File

@ -475,7 +475,6 @@ begin
); );
end if; end if;
bends = detect_bends(lines[i], dbgname, stagenum); bends = detect_bends(lines[i], dbgname, stagenum);
bends = fix_gentle_inflections(bends, dbgname, stagenum); bends = fix_gentle_inflections(bends, dbgname, stagenum);