wm/init.sql

26 lines
826 B
MySQL
Raw Normal View History

2021-05-19 22:57:48 +03:00
-- This file initializes tables for unit and river tests.
2021-05-19 22:57:48 +03:00
-- ST_SimplifyWM, when dbgname is non-empty, expects `wm_debug` table to be
-- created.
-- to preview this somewhat conveniently in QGIS:
-- stage || '_' || name || ' gen:' || coalesce(gen, 'Ø') || ' nbend:' || lpad(nbend, 4, '0')
drop table if exists wm_debug;
2021-05-19 22:57:49 +03:00
create table wm_debug(
id serial,
2021-05-19 22:57:49 +03:00
stage text not null,
name text not null,
gen bigint not null,
nbend bigint,
way geometry,
props jsonb
);
2021-05-19 22:57:48 +03:00
-- Run ST_SimplifyWM in debug mode, so `wm_debug` is populated. That table
-- is used for geometric assertions later in the file.
drop table if exists wm_demo;
create table wm_demo (name text, i bigint, way geometry);
2021-05-19 22:57:48 +03:00
-- wm_visuals holds visual aids for the paper.
drop table if exists wm_visuals;
create table wm_visuals (name text, way geometry);