stud/IV/tests-integration.sql

19 lines
613 B
MySQL
Raw Normal View History

2021-03-17 11:32:12 +02:00
\i wm.sql
2021-04-06 17:48:25 +03:00
drop table if exists wm_debug;
2021-04-08 15:19:36 +03:00
create table wm_debug(stage text, name text, gen bigint, nbend bigint, way geometry, props jsonb);
2021-03-29 14:57:44 +03:00
2021-04-16 08:00:08 +03:00
do $$
declare
npoints bigint;
secs bigint;
begin
select * from ST_SimplifyWM_Estimate((select st_union(way) from agg_rivers)) into npoints, secs;
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-06 17:48:25 +03:00
drop table if exists wm_demo;
create table wm_demo (name text, i bigint, way geometry);
insert into wm_demo (name, way) select name, ST_SimplifyWM(way, name) from agg_rivers;