wm

Wang–Müller line generalization algorithm in PostGIS
Log | Files | Refs | README | LICENSE

init.sql (943B) - Raw


      1 -- This file initializes tables for unit and river tests.
      2 -- ST_SimplifyWM, when dbgname is non-empty, expects `wm_debug` table to be
      3 -- created.
      4 
      5 -- to preview this somewhat conveniently in QGIS:
      6 -- stage || '_' || name || ' gen:' || coalesce(gen, 'Ø') || ' nbend:' || lpad(nbend, 4, '0')
      7 drop table if exists wm_debug;
      8 create table wm_debug(
      9   id serial,
     10   stage text not null,
     11   name text not null,
     12   gen bigint not null,
     13   nbend bigint,
     14   way geometry,
     15   props jsonb
     16 );
     17 
     18 drop table if exists wm_manual;
     19 create table wm_manual (
     20   id serial,
     21   name text,
     22   way geometry,
     23   props jsonb
     24 );
     25 
     26 -- Run ST_SimplifyWM in debug mode, so `wm_debug` is populated. That table
     27 -- is used for geometric assertions later in the file.
     28 drop table if exists wm_demo;
     29 create table wm_demo (name text, i bigint, way geometry);
     30 
     31 -- wm_visuals holds visual aids for the paper.
     32 drop table if exists wm_visuals;
     33 create table wm_visuals (name text, way geometry);