build bend_attrs also for zero-area bendsarea

This commit is contained in:
Motiejus Jakštys 2021-05-19 22:57:46 +03:00 committed by Motiejus Jakštys
parent 863b23f2ef
commit 0de0a4204e

14
wm.sql
View File

@ -289,13 +289,13 @@ begin
select fourpi*area/(st_perimeter(polygon)^2) into cmp; select fourpi*area/(st_perimeter(polygon)^2) into cmp;
if cmp > 0 then if cmp > 0 then
select (area*(0.75/cmp)) into adjsize; select (area*(0.75/cmp)) into adjsize;
if dbg then end if;
insert into debug_wm (name, way, props) values( if dbg then
'bend_attrs_' || i, insert into debug_wm (name, way, props) values(
polygon, 'bend_attrs_' || i,
json_build_object('area', area, 'cmp', cmp, 'adjsize', adjsize) polygon,
); json_build_object('area', area, 'cmp', cmp, 'adjsize', adjsize)
end if; );
end if; end if;
return next; return next;
end loop; end loop;