better estimation
This commit is contained in:
parent
5f6a997e29
commit
79952c09c9
@ -10,7 +10,7 @@ declare
|
|||||||
begin
|
begin
|
||||||
select * from ST_SimplifyWM_Estimate((select st_union(way) from agg_rivers)) into npoints, secs;
|
select * from ST_SimplifyWM_Estimate((select st_union(way) from agg_rivers)) into npoints, secs;
|
||||||
raise notice 'Total points: %', npoints;
|
raise notice 'Total points: %', npoints;
|
||||||
raise notice 'Expected duration: %s (+-%s), depending on bend complexity', ceil(secs), floor(secs*.5);
|
raise notice 'Expected duration: %s (+-%s)', ceil(secs), floor(secs*.5);
|
||||||
end $$ language plpgsql;
|
end $$ language plpgsql;
|
||||||
|
|
||||||
drop table if exists wm_demo;
|
drop table if exists wm_demo;
|
||||||
|
@ -19,6 +19,7 @@ declare
|
|||||||
prev_sign int4;
|
prev_sign int4;
|
||||||
cur_sign int4;
|
cur_sign int4;
|
||||||
l_type text;
|
l_type text;
|
||||||
|
dbgpolygon geometry;
|
||||||
begin
|
begin
|
||||||
l_type = st_geometrytype(line);
|
l_type = st_geometrytype(line);
|
||||||
if l_type != 'ST_LineString' then
|
if l_type != 'ST_LineString' then
|
||||||
@ -82,12 +83,18 @@ begin
|
|||||||
i,
|
i,
|
||||||
bends[i]
|
bends[i]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
dbgpolygon = null;
|
||||||
|
if st_npoints(bends[i]) >= 3 then
|
||||||
|
dbgpolygon = st_makepolygon(st_addpoint(bends[i], st_startpoint(bends[i])));
|
||||||
|
end if;
|
||||||
|
|
||||||
insert into wm_debug(stage, name, gen, nbend, way) values(
|
insert into wm_debug(stage, name, gen, nbend, way) values(
|
||||||
'bbends-polygon',
|
'bbends-polygon',
|
||||||
dbgname,
|
dbgname,
|
||||||
dbgstagenum,
|
dbgstagenum,
|
||||||
i,
|
i,
|
||||||
st_makepolygon(st_addpoint(bends[i], st_startpoint(bends[i])))
|
dbgpolygon
|
||||||
);
|
);
|
||||||
end loop;
|
end loop;
|
||||||
end if;
|
end if;
|
||||||
|
Loading…
Reference in New Issue
Block a user