wm/tests-integration.sql

14 lines
392 B
PL/PgSQL

\i wm.sql
do $$
declare
npoints bigint;
secs bigint;
begin
select * from ST_SimplifyWM_Estimate((select st_union(way) from wm_rivers)) into npoints, secs;
raise notice 'Total points: %', npoints;
raise notice 'Expected duration: %s (+-%s)', ceil(secs), floor(secs*.5);
end $$ language plpgsql;
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, name) from wm_rivers;