always order wm_debug
by insertion time
This commit is contained in:
parent
761f0f5c68
commit
d7e9371d3c
@ -6,6 +6,7 @@
|
|||||||
-- stage || '_' || name || ' gen:' || coalesce(gen, 'Ø') || ' nbend:' || lpad(nbend, 4, '0')
|
-- stage || '_' || name || ' gen:' || coalesce(gen, 'Ø') || ' nbend:' || lpad(nbend, 4, '0')
|
||||||
drop table if exists wm_debug;
|
drop table if exists wm_debug;
|
||||||
create table wm_debug(
|
create table wm_debug(
|
||||||
|
id serial,
|
||||||
stage text not null,
|
stage text not null,
|
||||||
name text not null,
|
name text not null,
|
||||||
gen bigint not null,
|
gen bigint not null,
|
||||||
|
@ -16,12 +16,12 @@ begin
|
|||||||
end $$ LANGUAGE plpgsql;
|
end $$ LANGUAGE plpgsql;
|
||||||
|
|
||||||
drop function if exists dbg_geomsummary;
|
drop function if exists dbg_geomsummary;
|
||||||
create function dbg_geomsummary(geoms geometry[], OUT output text) as $$
|
create function dbg_geomsummary(geoms geometry[]) returns void as $$
|
||||||
declare i int4;
|
declare i int4;
|
||||||
begin
|
begin
|
||||||
output = format('len: %s;', array_length(geoms, 1));
|
raise notice 'len: %', array_length(geoms, 1);
|
||||||
for i in 1..array_length(geoms, 1) loop
|
for i in 1..array_length(geoms, 1) loop
|
||||||
output = output || format(' %s:%s;', i, st_astext(geoms[i]));
|
raise notice '%: %', lpad(i::text, 2, '0'), st_astext(geoms[i]);
|
||||||
end loop;
|
end loop;
|
||||||
end
|
end
|
||||||
$$ language plpgsql;
|
$$ language plpgsql;
|
||||||
@ -86,7 +86,7 @@ create function wm_debug_get(
|
|||||||
) as $$
|
) as $$
|
||||||
declare
|
declare
|
||||||
begin
|
begin
|
||||||
ways = array((select way from wm_debug where stage=_stage and name=_name));
|
ways = array((select way from wm_debug where stage=_stage and name=_name order by id));
|
||||||
end $$ language plpgsql;
|
end $$ language plpgsql;
|
||||||
|
|
||||||
do $$
|
do $$
|
||||||
|
@ -427,6 +427,7 @@ declare
|
|||||||
begin
|
begin
|
||||||
area_threshold = radians(180) * ((dhalfcircle/2)^2)/2;
|
area_threshold = radians(180) * ((dhalfcircle/2)^2)/2;
|
||||||
mutated = false;
|
mutated = false;
|
||||||
|
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user