fix a few observability bugs
This commit is contained in:
parent
5f883419e6
commit
eda24cb6bc
@ -66,6 +66,7 @@ begin
|
||||
end $$ language plpgsql;
|
||||
|
||||
|
||||
delete from wm_debug where name like 'salvis%';
|
||||
delete from wm_visuals where name like 'salvis%';
|
||||
insert into wm_visuals(name, way) values('salvis', (
|
||||
with multismall as (
|
||||
@ -93,6 +94,7 @@ do $$
|
||||
declare sclong geometry;
|
||||
declare scshort geometry;
|
||||
begin
|
||||
delete from wm_debug where name like 'fig6-%' or name like 'selfcrossing-1%';
|
||||
delete from wm_visuals where name like 'fig6-%' or name like 'selfcrossing-1%';
|
||||
|
||||
select way from wm_debug where name='fig6' and stage='bbends' and gen=1 into fig6b1 limit 1 offset 0;
|
||||
@ -125,7 +127,7 @@ begin
|
||||
end loop;
|
||||
--foreach i in array array[75, 375] loop
|
||||
foreach i in array array[75] loop
|
||||
geom3 = st_simplifywm((select way from wm_visuals where name='salvis'), i, 50, 'salvis-' || i);
|
||||
geom3 = st_simplifywm((select way from wm_visuals where name='salvis'), i, 50, 'salvis-wm-' || i);
|
||||
insert into wm_visuals(name, way) values
|
||||
('salvis-wm-' || i, geom3);
|
||||
end loop;
|
||||
|
17
IV/wm.sql
17
IV/wm.sql
@ -359,7 +359,7 @@ begin
|
||||
for i in 1..array_length(attrs, 1) loop
|
||||
if dbgname is not null then
|
||||
insert into wm_debug (stage, name, gen, nbend, way, props) values(
|
||||
'ebendattrs', dbgname, dbggen, i, bend,
|
||||
'ebendattrs', dbgname, dbggen, i, bends[i],
|
||||
jsonb_build_object(
|
||||
'adjsize', attrs[i].adjsize,
|
||||
'baselinelength', attrs[i].baselinelength,
|
||||
@ -706,6 +706,8 @@ begin
|
||||
for i in 1..array_length(lines, 1) loop
|
||||
mutated = true;
|
||||
gen = 1;
|
||||
|
||||
raise notice 'dbgname: %, gen: %', dbgname, gen;
|
||||
while mutated loop
|
||||
if dbgname is not null then
|
||||
insert into wm_debug (stage, name, gen, nbend, way) values(
|
||||
@ -736,15 +738,16 @@ begin
|
||||
|
||||
if st_geometrytype(lines[i]) != 'ST_LineString' then
|
||||
-- For manual debugging:
|
||||
--insert into wm_manual(name, way)
|
||||
--select 'non-linestring-' || a.path[1], a.geom
|
||||
--from st_dump(lines[i]) a
|
||||
--order by a.path[1];
|
||||
raise 'Got % (in %) instead of ST_LineString. '
|
||||
insert into wm_manual(name, way)
|
||||
select 'non-linestring-' || a.path[1], a.geom
|
||||
from st_dump(lines[i]) a
|
||||
order by a.path[1];
|
||||
raise notice 'Got % (in %) instead of ST_LineString. '
|
||||
'Does the exaggerated bend intersect with the line? '
|
||||
'If so, try increasing intersect_patience.',
|
||||
st_geometrytype(lines[i]), dbgname;
|
||||
--exit lineloop;
|
||||
raise notice 'exiting lineloop, gen:%', gen;
|
||||
exit lineloop;
|
||||
end if;
|
||||
gen = gen + 1;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user