From 66606849120ded682663e501a8603ef58ff4173d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 15 Feb 2021 11:14:50 +0200 Subject: [PATCH] rename files --- IV/figures.sql | 5 ----- IV/tests.sql | 10 ++++++++++ IV/{bend.sql => wm.sql} | 5 ----- 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 IV/figures.sql create mode 100644 IV/tests.sql rename IV/{bend.sql => wm.sql} (78%) diff --git a/IV/figures.sql b/IV/figures.sql deleted file mode 100644 index eafcf03..0000000 --- a/IV/figures.sql +++ /dev/null @@ -1,5 +0,0 @@ -drop table if exists figures; -create table figures (name text, way geometry); - -insert into figures (name, way) values ('fig3', ST_GeomFromText('LINESTRING(0 0, 12 0, 13 4, 20 2, 20 0, 32 0, 33 10, 38 16, 43 15, 44 10, 44 0, 60 0)')); -insert into figures (name, way) values ('Žeimena', (select st_linemerge(st_union(p.way)) from planet_osm_line p where p.name = 'Žeimena')); diff --git a/IV/tests.sql b/IV/tests.sql new file mode 100644 index 0000000..8e05135 --- /dev/null +++ b/IV/tests.sql @@ -0,0 +1,10 @@ +\i wm.sql + +drop table if exists figures; +create table figures (name text, way geometry); +insert into figures (name, way) values ('fig3', ST_GeomFromText('LINESTRING(0 0, 12 0, 13 4, 20 2, 20 0, 32 0, 33 10, 38 16, 43 15, 44 10, 44 0, 60 0)')); + +drop table if exists bends; +create table bends as (select * from detect_bends((select way from figures where name='fig3'))); + +--insert into figures (name, way) values ('Žeimena', (select st_linemerge(st_union(p.way)) from planet_osm_line p where p.name = 'Žeimena')) diff --git a/IV/bend.sql b/IV/wm.sql similarity index 78% rename from IV/bend.sql rename to IV/wm.sql index f36fc54..a6c2194 100644 --- a/IV/bend.sql +++ b/IV/wm.sql @@ -38,8 +38,3 @@ begin end loop; end $$ language plpgsql; - -drop table if exists bends; - ---create table bends as (select * from detect_bends((select way from figures where name='fig3'))); -create table bends as (select * from detect_bends((select way from figures where name='Žeimena')));