regression tests: remove polygon diagrams

The diagrams were inaccurate.

Report by Emre Hasegeli
This commit is contained in:
Bruce Momjian 2015-03-19 22:10:52 -04:00
parent 788e799ed4
commit 05d1910c1c
2 changed files with 0 additions and 126 deletions

View File

@ -3,16 +3,6 @@
-- --
-- polygon logic -- polygon logic
-- --
-- 3 o
-- |
-- 2 + |
-- / |
-- 1 # +
-- / o |
-- 0 #-----o-+
--
-- 0 1 2 3 4
--
CREATE TABLE POLYGON_TBL(f1 polygon); CREATE TABLE POLYGON_TBL(f1 polygon);
INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)'); INSERT INTO POLYGON_TBL(f1) VALUES ('(2.0,0.0),(2.0,4.0),(0.0,0.0)');
INSERT INTO POLYGON_TBL(f1) VALUES ('(3.0,1.0),(3.0,3.0),(1.0,0.0)'); INSERT INTO POLYGON_TBL(f1) VALUES ('(3.0,1.0),(3.0,3.0),(1.0,0.0)');
@ -128,17 +118,6 @@ SELECT '' AS one, p.*
-- --
-- polygon logic -- polygon logic
-- --
-- 3 o
-- /|
-- 2 + |
-- / |
-- 1 / o +
-- / |
-- 0 +-----o-+
--
-- 0 1 2 3 4
--
--
-- left of -- left of
SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false; SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
false false
@ -181,53 +160,24 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' @> polygon '(3.0,1.0),(3.0,3.0),(
f f
(1 row) (1 row)
-- +------------------------+
-- | *---* 1
-- | + | |
-- | 2 *---*
-- +------------------------+
-- 3
-- endpoints '+' is ofr one polygon, '*' - for another
-- Edges 1-2, 2-3 are not shown on picture
SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false"; SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false";
false false
------- -------
f f
(1 row) (1 row)
-- +-----------+
-- | *---* /
-- | | |/
-- | | +
-- | | |\
-- | *---* \
-- +-----------+
SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true"; SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
true true
------ ------
t t
(1 row) (1 row)
-- +-----------------+
-- | |
-- | +---*---*-----+
-- | | | |
-- | +---*---*-----+
-- | |
-- +-----------------+
SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false"; SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false";
false false
------- -------
f f
(1 row) (1 row)
-- +---------+
-- | |
-- | *----*
-- | | |
-- | *----*
-- | |
-- +---------+
SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true"; SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true";
true true
------ ------
@ -248,25 +198,12 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' && polygon '(3.0,1.0),(3.0,3.0),(
t t
(1 row) (1 row)
-- +--------------------+
-- | *---* 1
-- | + | |
-- | 2 *---*
-- +--------------------+
-- 3
-- Edges 1-2, 2-3 are not shown on picture
SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true"; SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
true true
------ ------
t t
(1 row) (1 row)
-- +--+ *--*
-- | | | |
-- | | *--*
-- | +----+
-- | |
-- +-------+
SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false"; SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false";
false false
------- -------

View File

@ -3,16 +3,6 @@
-- --
-- polygon logic -- polygon logic
-- --
-- 3 o
-- |
-- 2 + |
-- / |
-- 1 # +
-- / o |
-- 0 #-----o-+
--
-- 0 1 2 3 4
--
CREATE TABLE POLYGON_TBL(f1 polygon); CREATE TABLE POLYGON_TBL(f1 polygon);
@ -83,17 +73,6 @@ SELECT '' AS one, p.*
-- --
-- polygon logic -- polygon logic
-- --
-- 3 o
-- /|
-- 2 + |
-- / |
-- 1 / o +
-- / |
-- 0 +-----o-+
--
-- 0 1 2 3 4
--
--
-- left of -- left of
SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false; SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' << polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
@ -112,41 +91,12 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' <@ polygon '(3.0,1.0),(3.0,3.0),(
-- contains -- contains
SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' @> polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false; SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' @> polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS false;
-- +------------------------+
-- | *---* 1
-- | + | |
-- | 2 *---*
-- +------------------------+
-- 3
-- endpoints '+' is ofr one polygon, '*' - for another
-- Edges 1-2, 2-3 are not shown on picture
SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false"; SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "false";
-- +-----------+
-- | *---* /
-- | | |/
-- | | +
-- | | |\
-- | *---* \
-- +-----------+
SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true"; SELECT '((0,4),(6,4),(3,2),(6,0),(0,0))'::polygon @> '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
-- +-----------------+
-- | |
-- | +---*---*-----+
-- | | | |
-- | +---*---*-----+
-- | |
-- +-----------------+
SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false"; SELECT '((1,1),(1,4),(5,4),(5,3),(2,3),(2,2),(5,2),(5,1))'::polygon @> '((3,2),(3,3),(4,3),(4,2))'::polygon AS "false";
-- +---------+
-- | |
-- | *----*
-- | | |
-- | *----*
-- | |
-- +---------+
SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true"; SELECT '((0,0),(0,3),(3,3),(3,0))'::polygon @> '((2,1),(2,2),(3,2),(3,1))'::polygon AS "true";
-- same -- same
@ -155,21 +105,8 @@ SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' ~= polygon '(3.0,1.0),(3.0,3.0),(
-- overlap -- overlap
SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' && polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS true; SELECT polygon '(2.0,0.0),(2.0,4.0),(0.0,0.0)' && polygon '(3.0,1.0),(3.0,3.0),(1.0,0.0)' AS true;
-- +--------------------+
-- | *---* 1
-- | + | |
-- | 2 *---*
-- +--------------------+
-- 3
-- Edges 1-2, 2-3 are not shown on picture
SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true"; SELECT '((0,4),(6,4),(1,2),(6,0),(0,0))'::polygon && '((2,1),(2,3),(3,3),(3,1))'::polygon AS "true";
-- +--+ *--*
-- | | | |
-- | | *--*
-- | +----+
-- | |
-- +-------+
SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false"; SELECT '((1,4),(1,1),(4,1),(4,2),(2,2),(2,4),(1,4))'::polygon && '((3,3),(4,3),(4,4),(3,4),(3,3))'::polygon AS "false";
SELECT '((200,800),(800,800),(800,200),(200,200))' && '(1000,1000,0,0)'::polygon AS "true"; SELECT '((200,800),(800,800),(800,200),(200,200))' && '(1000,1000,0,0)'::polygon AS "true";