2021-03-17 11:32:12 +02:00
|
|
|
\i wm.sql
|
|
|
|
|
2021-04-16 08:00:08 +03:00
|
|
|
do $$
|
|
|
|
declare
|
|
|
|
npoints bigint;
|
|
|
|
secs bigint;
|
|
|
|
begin
|
2021-04-17 16:16:27 +03:00
|
|
|
select * from ST_SimplifyWM_Estimate((select st_union(way) from wm_rivers)) into npoints, secs;
|
2021-04-16 08:00:08 +03:00
|
|
|
raise notice 'Total points: %', npoints;
|
2021-04-16 08:05:17 +03:00
|
|
|
raise notice 'Expected duration: %s (+-%s)', ceil(secs), floor(secs*.5);
|
2021-04-16 08:00:08 +03:00
|
|
|
end $$ language plpgsql;
|
|
|
|
|
2021-04-17 16:16:27 +03:00
|
|
|
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, name) from wm_rivers;
|