]> granicus.if.org Git - postgis/commitdiff
Dropped casts to box2d and replaced with casts to box3d. Associated ticket is #1330.
authorBborie Park <bkpark at ucdavis.edu>
Wed, 14 Dec 2011 22:57:58 +0000 (22:57 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Wed, 14 Dec 2011 22:57:58 +0000 (22:57 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8419 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in.c
raster/test/regress/Makefile.in
raster/test/regress/box3d.sql [moved from raster/test/regress/rt_box2d.sql with 65% similarity]
raster/test/regress/box3d_expected [moved from raster/test/regress/create_rt_box2d_test_expected with 100% similarity]
raster/test/regress/create_box3d_test.sql [moved from raster/test/regress/create_rt_box2d_test.sql with 86% similarity]
raster/test/regress/create_box3d_test_expected [moved from raster/test/regress/rt_box2d_expected with 100% similarity]

index 09309d777a26249e5fa87acab604cd06189c89f5..e807a3e462c04a7fd4392471dc7eb0eede09dc89 100644 (file)
@@ -80,9 +80,9 @@ CREATE OR REPLACE FUNCTION st_convexhull(raster)
     AS 'MODULE_PATHNAME','RASTER_convex_hull'
     LANGUAGE 'C' IMMUTABLE STRICT;
 
-CREATE OR REPLACE FUNCTION box2d(raster)
-    RETURNS box2d
-    AS 'select box2d(st_convexhull($1))'
+CREATE OR REPLACE FUNCTION box3d(raster)
+    RETURNS box3d
+    AS 'select box3d(st_convexhull($1))'
     LANGUAGE 'SQL' IMMUTABLE STRICT;
 
 CREATE OR REPLACE FUNCTION st_envelope(raster)
@@ -2815,8 +2815,8 @@ CREATE OR REPLACE FUNCTION st_bytea(raster)
 --  Casts
 ------------------------------------------------------------------------------
 
-CREATE CAST (raster AS box2d)
-    WITH FUNCTION box2d(raster) AS IMPLICIT;
+CREATE CAST (raster AS box3d)
+    WITH FUNCTION box3d(raster) AS IMPLICIT;
 
 CREATE CAST (raster AS geometry)
     WITH FUNCTION st_convexhull(raster) AS IMPLICIT;
index 4fb095802d95d60c6f7e241bf37228cff6816f9f..5d5c43cc266ab980b22ac15da91353cfa6c02492 100644 (file)
@@ -40,8 +40,8 @@ TEST_IO = \
 TEST_FUNC = \
        create_rt_bytea_test.sql \
        rt_bytea.sql \
-       create_rt_box2d_test.sql \
-       rt_box2d.sql \
+       create_box3d_test.sql \
+       box3d.sql \
        rt_addband.sql \
        rt_band.sql \
        rt_asgdalraster.sql \
similarity index 65%
rename from raster/test/regress/rt_box2d.sql
rename to raster/test/regress/box3d.sql
index 3aecae0a2da434ad8f2f3152998e59f1964aa00a..e3c5a90680214fdc99500fccc7ead43705a1a580 100644 (file)
 SELECT
        id,
        env as expected,
-       rast::box2d as obtained
-FROM rt_box2d_test
+       rast::box3d as obtained
+FROM rt_box3d_test
 WHERE
-       rast::box2d::text != env::text;
+       rast::box3d::text != env::text;
 
 SELECT
        id,
        env as expected,
-       box2d(rast) as obtained
-FROM rt_box2d_test
+       box3d(rast) as obtained
+FROM rt_box3d_test
 WHERE
-       box2d(rast)::text != env::text;
+       box3d(rast)::text != env::text;
 
 SELECT
        id,
        env as expected,
-       box2d(st_convexhull(rast)) as obtained
-FROM rt_box2d_test
+       box3d(st_convexhull(rast)) as obtained
+FROM rt_box3d_test
 WHERE
-       box2d(st_convexhull(rast))::text != env::text;
+       box3d(st_convexhull(rast))::text != env::text;
 
 SELECT
        id,
        env as expected,
-       box2d(st_envelope(rast)) as obtained
-FROM rt_box2d_test
+       box3d(st_envelope(rast)) as obtained
+FROM rt_box3d_test
 WHERE
-       box2d(st_envelope(rast))::text != env::text;
+       box3d(st_envelope(rast))::text != env::text;
similarity index 86%
rename from raster/test/regress/create_rt_box2d_test.sql
rename to raster/test/regress/create_box3d_test.sql
index 8c2140ac7996e9c98c7912adcf730c928c18395a..c5dda8c100357a2573a6b631f06b1374df06eea7 100644 (file)
@@ -7,15 +7,15 @@
 -- the terms of the GNU General Public Licence. See the COPYING file.
 -----------------------------------------------------------------------
 
-CREATE TABLE rt_box2d_test (
+CREATE TABLE rt_box3d_test (
     id numeric,
     name text,
     rast raster,
-    env box2d
+    env box3d
 );
 
 -- 10x20, ip:0.5,0.5 scale:2,3
-INSERT INTO rt_box2d_test 
+INSERT INTO rt_box3d_test 
 VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0',
 (
 '01' -- little endian (uint8 ndr)
@@ -42,10 +42,10 @@ VALUES ( 0, '10x20, ip:0.5,0.5 scale:2,3 skew:0,0',
 ||
 '1400' -- height (uint16 20)
 )::raster
-,'BOX(0.5 0.5,20.5 60.5)' -- expected envelope (20x60) == (10*2 x 20*3)
+,'BOX3D(0.5 0.5,20.5 60.5 0)' -- expected envelope (20x60) == (10*2 x 20*3)
 );
 
-INSERT INTO rt_box2d_test 
+INSERT INTO rt_box3d_test 
 VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0',
 (
 '01' -- little endian (uint8 ndr)
@@ -72,10 +72,10 @@ VALUES ( 1, '1x1, ip:2.5,2.5 scale:5,5 skew:0,0',
 ||
 '0100' -- height (uint16 1)
 )::raster
-,'BOX(2.5 2.5,7.5 7.5)' -- expected envelope 
+,'BOX3D(2.5 2.5,7.5 7.5 0)' -- expected envelope 
 );
 
-INSERT INTO rt_box2d_test 
+INSERT INTO rt_box3d_test 
 VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0',
 (
 '01' -- little endian (uint8 ndr)
@@ -102,5 +102,5 @@ VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0',
 ||
 '0100' -- height (uint16 1)
 )::raster
-,'BOX(7.5 2.5,12.5 7.5)' -- expected envelope 
+,'BOX3D(7.5 2.5,12.5 7.5 0)' -- expected envelope 
 );