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