retain zero-sized bends
This commit is contained in:
parent
8c10fbecfb
commit
0da5f8433c
@ -53,8 +53,8 @@ insert into wm_figures (name, way) values ('selfcrossing-1-rev',ST_Reverse(ST_Tr
|
|||||||
|
|
||||||
delete from wm_debug where name in (select distinct name from wm_figures);
|
delete from wm_debug where name in (select distinct name from wm_figures);
|
||||||
delete from wm_demo where name in (select distinct name from wm_figures);
|
delete from wm_demo where name in (select distinct name from wm_figures);
|
||||||
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, 10000, name) from wm_figures where name != 'fig8';
|
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, .1, name) from wm_figures where name != 'fig8';
|
||||||
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, 15, name) from wm_figures where name = 'fig8';
|
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, .1, name) from wm_figures where name = 'fig8';
|
||||||
|
|
||||||
|
|
||||||
do $$
|
do $$
|
||||||
|
7
wm.sql
7
wm.sql
@ -431,7 +431,8 @@ begin
|
|||||||
i = 1;
|
i = 1;
|
||||||
while i < array_length(bendattrs, 1)-1 loop
|
while i < array_length(bendattrs, 1)-1 loop
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
continue when area_threshold >= bendattrs[i].adjsize;
|
continue when bendattrs[i].adjsize = 0;
|
||||||
|
continue when bendattrs[i].adjsize > area_threshold;
|
||||||
|
|
||||||
if i = 2 then
|
if i = 2 then
|
||||||
leftsize = bendattrs[i].adjsize + 1;
|
leftsize = bendattrs[i].adjsize + 1;
|
||||||
@ -445,8 +446,8 @@ begin
|
|||||||
rightsize = bendattrs[i+1].adjsize;
|
rightsize = bendattrs[i+1].adjsize;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
continue when leftsize <= bendattrs[i].adjsize;
|
continue when bendattrs[i].adjsize >= leftsize;
|
||||||
continue when rightsize <= bendattrs[i].adjsize;
|
continue when bendattrs[i].adjsize >= rightsize;
|
||||||
|
|
||||||
-- Local minimum. Elminate!
|
-- Local minimum. Elminate!
|
||||||
mutated = true;
|
mutated = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user