]> granicus.if.org Git - postgis/commitdiff
Added checks of SRID to make sure that SRIDs are within the permitted range. Ticket...
authorBborie Park <bkpark at ucdavis.edu>
Fri, 10 Feb 2012 23:33:37 +0000 (23:33 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Fri, 10 Feb 2012 23:33:37 +0000 (23:33 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9154 b70326c6-7e19-0410-871a-916f4a2858ee

24 files changed:
raster/rt_core/rt_api.c
raster/rt_pg/rt_pg.c
raster/test/core/testwkb.c
raster/test/regress/bug_test_car5_expected
raster/test/regress/create_rt_mapalgebra_test.sql
raster/test/regress/create_rt_mapalgebrafctngb_test.sql
raster/test/regress/create_rt_properties_test.sql
raster/test/regress/create_rt_utility_test.sql
raster/test/regress/rt_addband.sql
raster/test/regress/rt_band.sql
raster/test/regress/rt_bytea_expected
raster/test/regress/rt_count.sql
raster/test/regress/rt_histogram.sql
raster/test/regress/rt_mapalgebraexpr.sql
raster/test/regress/rt_mapalgebrafct.sql
raster/test/regress/rt_mapalgebrafctngb.sql
raster/test/regress/rt_mapalgebrafctngb_expected
raster/test/regress/rt_metadata.sql
raster/test/regress/rt_metadata_expected
raster/test/regress/rt_quantile.sql
raster/test/regress/rt_reclass.sql
raster/test/regress/rt_summarystats.sql
raster/test/regress/rt_valuecount.sql
raster/test/regress/rt_valuepercent.sql

index 8edc205889a40a746485975cc0234ee862fec3a5..605b6bb283d7e85991011eb58a6ff3244a2abae2 100644 (file)
@@ -4404,20 +4404,16 @@ rt_raster_calc_gt_coeff(double i_mag, double j_mag, double theta_i, double theta
 
 int32_t
 rt_raster_get_srid(rt_raster raster) {
+       assert(NULL != raster);
 
-
-    assert(NULL != raster);
-
-    return raster->srid;
+       return clamp_srid(raster->srid);
 }
 
 void
 rt_raster_set_srid(rt_raster raster, int32_t srid) {
+       assert(NULL != raster);
 
-
-    assert(NULL != raster);
-
-    raster->srid = srid;
+       raster->srid = clamp_srid(srid);
 }
 
 int
@@ -5220,7 +5216,7 @@ rt_raster_get_convex_hull(rt_raster raster) {
                                                gt);
     ptarray_set_point4d(pts, 3, &p4d);
 
-    ret = lwpoly_construct(raster->srid, 0, 1, rings);
+    ret = lwpoly_construct(rt_raster_get_srid(raster), 0, 1, rings);
 
     return ret;
 }
@@ -5813,7 +5809,7 @@ rt_raster_from_wkb(const uint8_t* wkb, uint32_t wkbsize) {
     rast->ipY = read_float64(&ptr, endian);
     rast->skewX = read_float64(&ptr, endian);
     rast->skewY = read_float64(&ptr, endian);
-    rast->srid = read_int32(&ptr, endian);
+               rt_raster_set_srid(rast, read_int32(&ptr, endian));
     rast->width = read_uint16(&ptr, endian);
     rast->height = read_uint16(&ptr, endian);
 
@@ -6727,6 +6723,7 @@ rt_raster_from_band(rt_raster raster, uint32_t *bandNums, int count) {
        int i = 0;
        int idx;
        int32_t flag;
+       double gt[6] = {0.};
 
        assert(NULL != raster);
        assert(NULL != bandNums);
@@ -6742,12 +6739,9 @@ rt_raster_from_band(rt_raster raster, uint32_t *bandNums, int count) {
        }
 
        /* copy raster attributes */
-       /* scale */
-       rt_raster_set_scale(rast, raster->scaleX, raster->scaleY);
-       /* offset */
-       rt_raster_set_offsets(rast, raster->ipX, raster->ipY);
-       /* skew */
-       rt_raster_set_skews(rast, raster->skewX, raster->skewY);
+       rt_raster_get_geotransform_matrix(raster, gt);
+       rt_raster_set_geotransform_matrix(rast, gt);
+
        /* srid */
        rt_raster_set_srid(rast, raster->srid);
 
@@ -9403,7 +9397,7 @@ rt_raster_same_alignment(
 
        err = 0;
        /* same srid */
-       if (rast1->srid != rast2->srid) {
+       if (rt_raster_get_srid(rast1) != rt_raster_get_srid(rast2)) {
                RASTER_DEBUG(3, "The two rasters provided have different SRIDs");
                err = 1;
        }
@@ -9507,7 +9501,7 @@ rt_raster_from_two_rasters(
        assert(NULL != rast2);
 
        /* rasters must have same srid */
-       if (rast1->srid != rast2->srid) {
+       if (rt_raster_get_srid(rast1) != rt_raster_get_srid(rast2)) {
                rterror("rt_raster_from_two_rasters: The two rasters provided do not have the same SRID");
                *err = 0;
                return NULL;
@@ -9573,7 +9567,7 @@ rt_raster_from_two_rasters(
                                *err = 0;
                                return NULL;
                        }
-                       raster->srid = _rast[i]->srid;
+                       rt_raster_set_srid(raster, _rast[i]->srid);
                        rt_raster_get_geotransform_matrix(_rast[i], gt);
                        rt_raster_set_geotransform_matrix(raster, gt);
                        break;
@@ -9637,7 +9631,7 @@ rt_raster_from_two_rasters(
                                *err = 0;
                                return NULL;
                        }
-                       raster->srid = _rast[0]->srid;
+                       rt_raster_set_srid(raster, _rast[0]->srid);
                        rt_raster_set_geotransform_matrix(raster, gt);
                        RASTER_DEBUGF(4, "gt = (%f, %f, %f, %f, %f, %f)",
                                gt[0],
@@ -9694,7 +9688,7 @@ rt_raster_from_two_rasters(
                                        *err = 0;
                                        return NULL;
                                }
-                               raster->srid = _rast[0]->srid;
+                               rt_raster_set_srid(raster, _rast[0]->srid);
                                rt_raster_set_scale(raster, 0, 0);
 
                                /* set offsets if provided */
@@ -9730,7 +9724,7 @@ rt_raster_from_two_rasters(
                                *err = 0;
                                return NULL;
                        }
-                       raster->srid = _rast[0]->srid;
+                       rt_raster_set_srid(raster, _rast[0]->srid);
 
                        /* get upper-left corner */
                        rt_raster_get_geotransform_matrix(_rast[0], gt);
index a8cc9482474850ff9981cb285458ce312db2a15e..d1af077a61b2d53b4c73d93d6d73f1516b6d6418 100644 (file)
@@ -49,8 +49,6 @@
 #include "../../postgis_config.h"
 
 #include "lwgeom_pg.h"
-#include "liblwgeom.h"
-#include "liblwgeom_internal.h" /* for clamp_srid() */
 #include "rt_pg.h"
 #include "pgsql_compat.h"
 
index eaaa7a966eb2a85566cba1a303183d82ada153d6..e1e7ae068dc629773cfe123d380d5489e72dc98b 100644 (file)
@@ -566,7 +566,7 @@ main()
     CHECK_EQUALS(rt_raster_get_y_offset(raster), 642930.0);
     CHECK_EQUALS(rt_raster_get_x_skew(raster), 0);
     CHECK_EQUALS(rt_raster_get_y_skew(raster), 0);
-    CHECK_EQUALS(rt_raster_get_srid(raster), -1);
+    CHECK_EQUALS(rt_raster_get_srid(raster), 0);
     CHECK_EQUALS(rt_raster_get_width(raster), 3);
     CHECK_EQUALS(rt_raster_get_height(raster), 1);
     {
@@ -660,7 +660,7 @@ main()
     CHECK_EQUALS_DOUBLE(rt_raster_get_y_offset(raster), 5793244.00);
     CHECK_EQUALS_DOUBLE(rt_raster_get_x_skew(raster), 0.0);
     CHECK_EQUALS_DOUBLE(rt_raster_get_y_skew(raster), 0.0);
-    CHECK_EQUALS(rt_raster_get_srid(raster), -1);
+    CHECK_EQUALS(rt_raster_get_srid(raster), 0);
     CHECK_EQUALS(rt_raster_get_width(raster), 5);
     CHECK_EQUALS(rt_raster_get_height(raster), 5);
     {
index 2f9a429ca6920b4c1949f997312883adb6817a31..2492ea8ed44688f13e3656360c4b63f6cd8796d6 100644 (file)
@@ -1,4 +1,7 @@
 BEGIN
+NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
+NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
+NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 1|5|5|8BUI|8BUI|8BUI
 2|5|5|8BUI|8BUI|8BUI
 3|5|5|8BUI|8BUI|8BUI
index 599c28f8b4f0741976b92f82d1b21eee6cc65773..b517582ac7ba2876473b03ef0b1f1a1a8f5539fc 100644 (file)
@@ -3,7 +3,7 @@ CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     $$
     DECLARE
     BEGIN
-        RETURN ST_AddBand(ST_MakeEmptyRaster(10, 10, ulx, uly, 1, 1, 0, 0, -1), '32BF', val, -1);
+        RETURN ST_AddBand(ST_MakeEmptyRaster(10, 10, ulx, uly, 1, 1, 0, 0, 0), '32BF', val, -1);
     END;
     $$
     LANGUAGE 'plpgsql';
index b4b323e2d104ffb252343e7f8c8fa853d112f844..f4ac7e4e2f42905dfe709fffce8cf28ae49be01b 100644 (file)
@@ -19,7 +19,7 @@ CREATE OR REPLACE FUNCTION ST_TestRasterNgb(h integer, w integer, val float8)
     $$
     DECLARE
     BEGIN
-        RETURN ST_AddBand(ST_MakeEmptyRaster(h, w, 0, 0, 1, 1, 0, 0, -1), '32BF', val, -1);
+        RETURN ST_AddBand(ST_MakeEmptyRaster(h, w, 0, 0, 1, 1, 0, 0, 0), '32BF', val, -1);
     END;
     $$
     LANGUAGE 'plpgsql';
index 011fa7ea66c6a86539ddc40a957a6b4a177417cc..b1ec2689505d4f47ad8dc4e72b1aa83db0acd184 100644 (file)
@@ -121,7 +121,7 @@ VALUES ( 2, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:0, width:1, height:1',
 
 INSERT INTO rt_properties_test 
 VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1',
-        -1, 1, 1, --- SRID, width, height
+         0, 1, 1, --- SRID, width, height
          5, 5, 7.5, 2.5, 0, 0, --- georeference
 (
 '01' -- little endian (uint8 ndr)
@@ -142,7 +142,7 @@ VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1',
 ||
 '0000000000000000' -- skewY (float64 0)
 ||
-'FFFFFFFF' -- SRID (int32 -1)
+'00000000' -- SRID (int32 0)
 ||
 '0100' -- width (uint16 1)
 ||
@@ -152,7 +152,7 @@ VALUES ( 3, '1x1, ip:7.5,2.5 scale:5,5 skew:0,0, srid:-1, width:1, height:1',
 
 INSERT INTO rt_properties_test 
 VALUES ( 4, '1x1, ip:7.5,2.5 scale:5,5 skew:1,1, srid:-1, width:1, height:1',
-        -1, 1, 1, --- SRID, width, height
+         0, 1, 1, --- SRID, width, height
          5, 5, 7.5, 2.5, 1, 1, --- georeference
 (
 '01' -- little endian (uint8 ndr)
@@ -173,7 +173,7 @@ VALUES ( 4, '1x1, ip:7.5,2.5 scale:5,5 skew:1,1, srid:-1, width:1, height:1',
 ||
 '000000000000F03F' -- skewY (float64 1)
 ||
-'FFFFFFFF' -- SRID (int32 -1)
+'00000000' -- SRID (int32 0)
 ||
 '0100' -- width (uint16 1)
 ||
@@ -183,7 +183,7 @@ VALUES ( 4, '1x1, ip:7.5,2.5 scale:5,5 skew:1,1, srid:-1, width:1, height:1',
 
 INSERT INTO rt_properties_test 
 VALUES ( 5, '1x1, ip:7.5,2.5 scale:5,5 skew:3,7, srid:-1, width:1, height:1',
-        -1, 1, 1, --- SRID, width, height
+         0, 1, 1, --- SRID, width, height
          5, 5, 7.5, 2.5, 3, 7, --- georeference
 (
 '01' -- little endian (uint8 ndr)
@@ -204,7 +204,7 @@ VALUES ( 5, '1x1, ip:7.5,2.5 scale:5,5 skew:3,7, srid:-1, width:1, height:1',
 ||
 '0000000000001C40' -- skewY (float64 7)
 ||
-'FFFFFFFF' -- SRID (int32 -1)
+'00000000' -- SRID (int32 0)
 ||
 '0100' -- width (uint16 1)
 ||
index 424f019bec355afe55d9f424d0203205b4e13bce..b37ee98134a0a07b5e6f46fdc14871e3418275f5 100644 (file)
@@ -7,6 +7,8 @@
 -- the terms of the GNU General Public Licence. See the COPYING file.
 -----------------------------------------------------------------------
 
+SET client_min_messages TO warning;
+
 -----------------------------------------------------------------------
 --- Test of "Get" functions for properties of the raster.
 -----------------------------------------------------------------------
index 0f961b651cf84f8bb4cda9863d5d1938e265aab1..d601db5457ba8dfecc3c650e433c9fe630996585 100644 (file)
 --- ST_AddBand
 -----------------------------------------------------------------------
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '1BB', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '1BB', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '1BB', 1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '1BB', 2, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '1BB', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 2, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '1BB', 21.46, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '2BUI', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '2BUI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '2BUI', 3, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '2BUI', 4, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '2BUI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 3, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 4, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '2BUI', 21.46, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '4BUI', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '4BUI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '4BUI', 15, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '4BUI', 16, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '4BUI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 15, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 16, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '4BUI', 21.46, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', -129, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', -128, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 127, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 128, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BSI', 210.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', -129, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', -128, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 127, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 128, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BSI', 210.46, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 255, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 256, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 410.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '8BUI', 255.9999999, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 255, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 256, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 410.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '8BUI', 255.9999999, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', -32769, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', -32768, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 32767, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 32768, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 210000.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', -32769, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', -32768, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 32767, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 32768, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BSI', 210000.46, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BUI', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BUI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BUI', 65535, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BUI', 65537, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BUI', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BUI', 210000.4645643647457, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 65535, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 65537, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '16BUI', 210000.4645643647457, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', -2147483649, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', -2147483648, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', 2147483647, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', 2147483648, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BSI', 210000.4645643647457, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', -2147483649, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', -2147483648, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 2147483647, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 2147483648, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BSI', 210000.4645643647457, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', 4294967295, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', 4294967296, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', 214294967296, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BUI', 4294967295.9999999, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 4294967295, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 4294967296, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 214294967296, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BUI', 4294967295.9999999, NULL), 3, 3);
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 4294967000, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 4294967000, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 4294967295, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 4294967295, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 4294967296, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 4294967296, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 21.46, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 21003.1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 21003.1, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 123.456, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 123.456, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 1234.567, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 1234.567, NULL), 3, 3)::float4;
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 210000.4645643647457, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '32BF', 210000.4645643647457, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967000, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967000, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967295, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967295, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967296, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 4294967296, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21.46, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21003.1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 21003.1, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 123.456, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 123.456, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 1234.567, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 1234.567, NULL), 3, 3)::float4;
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 210000.4645643647457, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '32BF', 210000.4645643647457, NULL), 3, 3)::float4;
 
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', -1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 0, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 14294967296.123456, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 21.46, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 21003.1, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 123.4567, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 1234.567, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 210000.4645643647457, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 1234.4645643647457, NULL), 3, 3);
-SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,-1), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, 1), 3, 3);
-SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,-1), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1), 3, 3);
-SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,-1), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1)), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', -1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 0, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 14294967296.123456, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 21.46, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 21003.1, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 123.4567, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.567, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 210000.4645643647457, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.4645643647457, NULL), 3, 3);
+SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,0), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1, 1), 3, 3);
+SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,0), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0), 1), 3, 3);
+SELECT St_Value(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0,0), 1, '64BF', 1234.5678, NULL), ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, 0)), 3, 3);
 -- array version test
 SELECT (ST_DumpAsPolygons(newrast,3)).val As b3val FROM (SELECT ST_AddBand(NULL, array_agg(rast)) AS newrast FROM (SELECT ST_AsRaster(ST_Buffer(ST_Point(10,10), 34),200,200, '8BUI',i*30) As rast FROM generate_series(1,3) As i ) As foo ) As foofoo;
index 678b49168b6b9bac217a791e14c13c830ee7228e..f01bcca43aec0c30a87ecc6f4178c987da6caf73 100644 (file)
@@ -1,12 +1,12 @@
-SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 123.4567, NULL), ARRAY[1]), 3, 3);
-SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 1234.567, NULL), 1), 3, 3);
-SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, -1), 1, '64BF', 1234.567, NULL)), 3, 3);
+SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 123.4567, NULL), ARRAY[1]), 3, 3);
+SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.567, NULL), 1), 3, 3);
+SELECT ST_Value(ST_Band(ST_AddBand(ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0, 0), 1, '64BF', 1234.567, NULL)), 3, 3);
 SELECT ST_Value(
        ST_Band(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -21,7 +21,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -36,7 +36,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -51,7 +51,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -66,7 +66,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -81,7 +81,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -96,7 +96,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -110,7 +110,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -125,7 +125,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -140,7 +140,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -155,7 +155,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -170,7 +170,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -185,7 +185,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -200,7 +200,7 @@ SELECT ST_Value(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -214,7 +214,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -229,7 +229,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -244,7 +244,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -259,7 +259,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -274,7 +274,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -289,7 +289,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -303,7 +303,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
@@ -317,7 +317,7 @@ SELECT ST_NumBands(
                ST_AddBand(
                        ST_AddBand(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(200, 200, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 1234.5678, NULL
                                )
                                , '64BF', 987.654321, NULL
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..af342c65daa3f98c05efa2503804a3e7397f8948 100644 (file)
@@ -0,0 +1 @@
+NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
index 75a4396da17dbdd8aabba4d4c56f35c938885b7b..39f7bd89485c6ce575763e740b42a199d3c78991 100644 (file)
@@ -3,7 +3,7 @@ SELECT ST_Count(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -19,7 +19,7 @@ SELECT ST_Count(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -35,7 +35,7 @@ SELECT ST_Count(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -51,7 +51,7 @@ SELECT ST_Count(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -71,7 +71,7 @@ CREATE TEMP TABLE test
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
index 2a0a0dda9110799d6fe47b551dbbefa0b8b80cc3..1c2efdee5c54b85852bdf28710c71c088b7ce991 100644 (file)
@@ -8,7 +8,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -28,7 +28,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -49,7 +49,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -70,7 +70,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -91,7 +91,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -112,7 +112,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -133,7 +133,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -154,7 +154,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -175,7 +175,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -196,7 +196,7 @@ FROM ST_Histogram(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -217,7 +217,7 @@ CREATE TEMP TABLE test_histogram
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
index 8ab2a6ebfb69439f2cb65561c78b53a92d11a4c8..350fc10f54de64bb7e3bf59cf3033cd926725ecb 100644 (file)
@@ -2,10 +2,10 @@
 SELECT ST_MapAlgebraExpr(NULL, 1, NULL, '[rast] + 20', 2) IS NULL FROM ST_TestRaster(0, 0, -1) rast;
 
 -- Test empty raster
-SELECT 'T1', ST_IsEmpty(ST_MapAlgebraExpr(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, '[rast] + 20', 2));
+SELECT 'T1', ST_IsEmpty(ST_MapAlgebraExpr(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, '[rast] + 20', 2));
 
 -- Test hasnoband raster
-SELECT 'T2', ST_HasNoBand(ST_MapAlgebraExpr(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, '[rast] + 20', 2));
+SELECT 'T2', ST_HasNoBand(ST_MapAlgebraExpr(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, '[rast] + 20', 2));
 
 -- Test hasnodata value
 SELECT 'T3', ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraExpr(ST_SetBandNoDataValue(rast, NULL), 1, NULL, '[rast] + 20', 2), 1, 1) FROM ST_TestRaster(0, 0, -1) rast;
index e7437a9635c7d8965d3dfed4fec0562f100b77f9..77f66bd3e5a2b984066059889997aa405b356728 100644 (file)
@@ -3,12 +3,12 @@ SELECT ST_MapAlgebraFct(NULL, 1, NULL, 'raster_plus_twenty(float, text[])'::regp
 SELECT ST_MapAlgebraFct(NULL, 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL) IS NULL FROM ST_TestRaster(0, 0, -1) rast;
 
 -- Test empty raster
-SELECT ST_IsEmpty(ST_MapAlgebraFct(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure));
-SELECT ST_IsEmpty(ST_MapAlgebraFct(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL));
+SELECT ST_IsEmpty(ST_MapAlgebraFct(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure));
+SELECT ST_IsEmpty(ST_MapAlgebraFct(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL));
 
 -- Test hasnoband raster
-SELECT ST_HasNoBand(ST_MapAlgebraFct(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure));
-SELECT ST_HasNoBand(ST_MapAlgebraFct(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL));
+SELECT ST_HasNoBand(ST_MapAlgebraFct(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure));
+SELECT ST_HasNoBand(ST_MapAlgebraFct(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure, NULL));
 
 -- Test hasnodata value
 SELECT ST_Value(rast, 1, 1), ST_Value(ST_MapAlgebraFct(ST_SetBandNoDataValue(rast, NULL), 1, NULL, 'raster_plus_twenty(float, text[])'::regprocedure), 1, 1) FROM ST_TestRaster(0, 0, -1) rast;
index 77ebd4e12040163a47594a905d99a9fbbabba93e..bafb6acbfd6047e56f07328158080c3a40556856 100644 (file)
@@ -3,10 +3,10 @@
 SELECT ST_MapAlgebraFctNgb(NULL, 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL) IS NULL FROM ST_TestRasterNgb(0, 0, -1) rast;
 
 -- Test empty Raster. Should be true.
-SELECT ST_IsEmpty(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL));
+SELECT ST_IsEmpty(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(0, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL));
 
 -- Test has no band raster. Should be true
-SELECT ST_HasNoBand(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, -1), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL));
+SELECT ST_HasNoBand(ST_MapAlgebraFctNgb(ST_MakeEmptyRaster(10, 10, 0, 0, 1, 1, 1, 1, 0), 1, NULL, 1, 1, 'ST_Sum4ma(float[][], text, text[])'::regprocedure, 'NULL', NULL));
 
 -- Test huge neighborhood. Original raster returned.
 SELECT
index f6969b12d42e0c20ea870cb57ad6b26e45610984..bb8e65b2e229378b98fdabc6466a9b21572b0c35 100644 (file)
@@ -25,42 +25,12 @@ t|t
 t|t
 t|t
 t|t
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 t
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 t|t
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 t
 t
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 t|t|t|t|t
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 t|t|t
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
-NOTICE:  SRID value -1 converted to the officially unknown SRID value 0
 t|t|t
 t|t
 t
index b3ca8422a7d596b032868f0ce606a1e1c26b2ad2..56959d2762918e1e51ed94463c1a91f081a97da5 100644 (file)
@@ -1,7 +1,7 @@
 SELECT * FROM ST_MetaData(NULL);
 SELECT * FROM ST_MetaData(
        ST_AddBand(
-               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0)
                , 1, '64BF', 0, 0
        )
 );
index 59e38b89c8636b73a31e2653e375ae564ace9bd6..aee0e821521d66c2c0ab4041c8f59cd9df1a2e50 100644 (file)
@@ -1,2 +1,2 @@
 |||||||||
-10|10|10|10|2|2|0|0|-1|1
+10|10|10|10|2|2|0|0|0|1
index 4f19063231c1a42f5fb397dd57551c9c50f4776f..dba738488455215f49cc77be5a119431cd7171c8 100644 (file)
@@ -6,7 +6,7 @@ FROM ST_Quantile(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -25,7 +25,7 @@ FROM ST_Quantile(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -44,7 +44,7 @@ FROM ST_Quantile(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -63,7 +63,7 @@ FROM ST_Quantile(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -82,7 +82,7 @@ FROM ST_Quantile(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -101,7 +101,7 @@ FROM ST_Quantile(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -117,7 +117,7 @@ SELECT round(
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
@@ -135,7 +135,7 @@ SELECT round(
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
@@ -153,7 +153,7 @@ SELECT round(
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
@@ -171,7 +171,7 @@ SELECT round(
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
@@ -189,7 +189,7 @@ SELECT round(
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
@@ -211,7 +211,7 @@ CREATE TEMP TABLE test_quantile
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
index 2ec3cf573a15f225335283db68201ff84cfe77c9..f4753b1294e94a020d9c552b4b7b7ace958863f7 100644 (file)
@@ -8,7 +8,7 @@ FROM (
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, -1),
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0),
                                        1, '32BUI', 0, 0
                                ),
                                1, 1, 499
@@ -33,7 +33,7 @@ FROM (
                        ST_SetValue(
                                ST_AddBand(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, -1),
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0),
                                                1, '8BUI', 0, 1
                                        ),
                                        2, '32BUI', 0, 0
@@ -60,7 +60,7 @@ FROM (
                        ST_SetValue(
                                ST_AddBand(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, -1),
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0),
                                                1, '8BUI', 0, 1
                                        ),
                                        2, '32BUI', 0, 0
@@ -82,7 +82,7 @@ FROM (
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, -1),
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0, 0),
                                        1, '8BUI', 0, 0
                                ),
                                1, 1, 1, 255
@@ -101,7 +101,7 @@ FROM (
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, -1),
+                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0),
                                        1, '32BF', 1, 0
                                ),
                                1, 1, 1, 3.14159
@@ -120,7 +120,7 @@ FROM (
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, -1),
+                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0),
                                        1, '32BF', 1, 0
                                ),
                                1, 1, 1, 3.14159
@@ -139,7 +139,7 @@ FROM (
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, -1),
+                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0),
                                        1, '32BF', 1, 0
                                ),
                                1, 1, 1, 3.14159
@@ -158,7 +158,7 @@ FROM (
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, -1),
+                                       ST_MakeEmptyRaster(100, 100, 10, 10, 2, 2, 0, 0, 0),
                                        1, '32BF', 1, 0
                                ),
                                1, 1, 1, 3.14159
index 958fb93dea7f817d819cc4ad0e729ab044595277..12d043709a68297692be0ff5240807d6a5c040b8 100644 (file)
@@ -10,7 +10,7 @@ FROM ST_SummaryStats(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -26,7 +26,7 @@ SELECT count FROM ST_SummaryStats(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -42,7 +42,7 @@ SELECT count FROM ST_SummaryStats(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -58,7 +58,7 @@ SELECT round(mean::numeric, 3), round(stddev::numeric, 3) FROM ST_SummaryStats(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -74,7 +74,7 @@ SELECT round(mean::numeric, 3), round(stddev::numeric, 3) FROM ST_SummaryStats(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -90,7 +90,7 @@ SELECT round(mean::numeric, 3), round(stddev::numeric, 3) FROM ST_SummaryStats(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -111,7 +111,7 @@ CREATE TEMP TABLE test_summarystats
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
index 1422e8e07712d1fd8be0d6239598bd81ffdb3982..ae8139f6022e24eaac2dd554a58088e43d82c443 100644 (file)
@@ -3,7 +3,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -18,7 +18,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -33,7 +33,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -48,7 +48,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -63,7 +63,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -78,7 +78,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -93,7 +93,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -108,7 +108,7 @@ SELECT round(value::numeric, 3), count FROM ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -123,7 +123,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -138,7 +138,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -153,7 +153,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -168,7 +168,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -183,7 +183,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -198,7 +198,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -213,7 +213,7 @@ SELECT ST_ValueCount(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -233,7 +233,7 @@ CREATE TEMP TABLE test
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10
index a7fd2716f5bc7458f47d0ed25a6422f47ce11e29..377f3fd7247f3836184658b1cb47d51ff7c98519 100644 (file)
@@ -3,7 +3,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -18,7 +18,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -33,7 +33,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -48,7 +48,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -63,7 +63,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -78,7 +78,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -93,7 +93,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -108,7 +108,7 @@ SELECT round(value::numeric, 3), round(percent::numeric, 3) FROM ST_ValuePercent
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -123,7 +123,7 @@ SELECT round(ST_ValuePercent(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -138,7 +138,7 @@ SELECT round(ST_ValuePercent(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -153,7 +153,7 @@ SELECT round(ST_ValuePercent(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -168,7 +168,7 @@ SELECT round(ST_ValuePercent(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -183,7 +183,7 @@ SELECT round(ST_ValuePercent(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -198,7 +198,7 @@ SELECT round(ST_ValuePercent(
                ST_SetValue(
                        ST_SetValue(
                                ST_AddBand(
-                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                       ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                        , 1, '64BF', 0, 0
                                )
                                , 1, 1, 1, -10
@@ -218,7 +218,7 @@ CREATE TEMP TABLE test
                        ST_SetValue(
                                ST_SetValue(
                                        ST_AddBand(
-                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,-1)
+                                               ST_MakeEmptyRaster(10, 10, 10, 10, 2, 2, 0, 0,0)
                                                , 1, '64BF', 0, 0
                                        )
                                        , 1, 1, 1, -10