From 9369f895570a9547c3fc718c15b89bb0c13ae084 Mon Sep 17 00:00:00 2001 From: Bborie Park Date: Fri, 10 Feb 2012 23:33:37 +0000 Subject: [PATCH] Added checks of SRID to make sure that SRIDs are within the permitted range. Ticket is #1568. git-svn-id: http://svn.osgeo.org/postgis/trunk@9154 b70326c6-7e19-0410-871a-916f4a2858ee --- raster/rt_core/rt_api.c | 38 ++-- raster/rt_pg/rt_pg.c | 2 - raster/test/core/testwkb.c | 4 +- raster/test/regress/bug_test_car5_expected | 3 + .../regress/create_rt_mapalgebra_test.sql | 2 +- .../create_rt_mapalgebrafctngb_test.sql | 2 +- .../regress/create_rt_properties_test.sql | 12 +- .../test/regress/create_rt_utility_test.sql | 2 + raster/test/regress/rt_addband.sql | 170 +++++++++--------- raster/test/regress/rt_band.sql | 50 +++--- raster/test/regress/rt_bytea_expected | 1 + raster/test/regress/rt_count.sql | 10 +- raster/test/regress/rt_histogram.sql | 22 +-- raster/test/regress/rt_mapalgebraexpr.sql | 4 +- raster/test/regress/rt_mapalgebrafct.sql | 8 +- raster/test/regress/rt_mapalgebrafctngb.sql | 4 +- .../test/regress/rt_mapalgebrafctngb_expected | 30 ---- raster/test/regress/rt_metadata.sql | 2 +- raster/test/regress/rt_metadata_expected | 2 +- raster/test/regress/rt_quantile.sql | 24 +-- raster/test/regress/rt_reclass.sql | 16 +- raster/test/regress/rt_summarystats.sql | 14 +- raster/test/regress/rt_valuecount.sql | 32 ++-- raster/test/regress/rt_valuepercent.sql | 30 ++-- 24 files changed, 226 insertions(+), 258 deletions(-) diff --git a/raster/rt_core/rt_api.c b/raster/rt_core/rt_api.c index 8edc20588..605b6bb28 100644 --- a/raster/rt_core/rt_api.c +++ b/raster/rt_core/rt_api.c @@ -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); diff --git a/raster/rt_pg/rt_pg.c b/raster/rt_pg/rt_pg.c index a8cc94824..d1af077a6 100644 --- a/raster/rt_pg/rt_pg.c +++ b/raster/rt_pg/rt_pg.c @@ -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" diff --git a/raster/test/core/testwkb.c b/raster/test/core/testwkb.c index eaaa7a966..e1e7ae068 100644 --- a/raster/test/core/testwkb.c +++ b/raster/test/core/testwkb.c @@ -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); { diff --git a/raster/test/regress/bug_test_car5_expected b/raster/test/regress/bug_test_car5_expected index 2f9a429ca..2492ea8ed 100644 --- a/raster/test/regress/bug_test_car5_expected +++ b/raster/test/regress/bug_test_car5_expected @@ -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 diff --git a/raster/test/regress/create_rt_mapalgebra_test.sql b/raster/test/regress/create_rt_mapalgebra_test.sql index 599c28f8b..b517582ac 100644 --- a/raster/test/regress/create_rt_mapalgebra_test.sql +++ b/raster/test/regress/create_rt_mapalgebra_test.sql @@ -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'; diff --git a/raster/test/regress/create_rt_mapalgebrafctngb_test.sql b/raster/test/regress/create_rt_mapalgebrafctngb_test.sql index b4b323e2d..f4ac7e4e2 100644 --- a/raster/test/regress/create_rt_mapalgebrafctngb_test.sql +++ b/raster/test/regress/create_rt_mapalgebrafctngb_test.sql @@ -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'; diff --git a/raster/test/regress/create_rt_properties_test.sql b/raster/test/regress/create_rt_properties_test.sql index 011fa7ea6..b1ec26895 100644 --- a/raster/test/regress/create_rt_properties_test.sql +++ b/raster/test/regress/create_rt_properties_test.sql @@ -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) || diff --git a/raster/test/regress/create_rt_utility_test.sql b/raster/test/regress/create_rt_utility_test.sql index 424f019be..b37ee9813 100644 --- a/raster/test/regress/create_rt_utility_test.sql +++ b/raster/test/regress/create_rt_utility_test.sql @@ -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. ----------------------------------------------------------------------- diff --git a/raster/test/regress/rt_addband.sql b/raster/test/regress/rt_addband.sql index 0f961b651..d601db545 100644 --- a/raster/test/regress/rt_addband.sql +++ b/raster/test/regress/rt_addband.sql @@ -16,100 +16,100 @@ --- 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; diff --git a/raster/test/regress/rt_band.sql b/raster/test/regress/rt_band.sql index 678b49168..f01bcca43 100644 --- a/raster/test/regress/rt_band.sql +++ b/raster/test/regress/rt_band.sql @@ -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 diff --git a/raster/test/regress/rt_bytea_expected b/raster/test/regress/rt_bytea_expected index e69de29bb..af342c65d 100644 --- a/raster/test/regress/rt_bytea_expected +++ b/raster/test/regress/rt_bytea_expected @@ -0,0 +1 @@ +NOTICE: SRID value -1 converted to the officially unknown SRID value 0 diff --git a/raster/test/regress/rt_count.sql b/raster/test/regress/rt_count.sql index 75a4396da..39f7bd894 100644 --- a/raster/test/regress/rt_count.sql +++ b/raster/test/regress/rt_count.sql @@ -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 diff --git a/raster/test/regress/rt_histogram.sql b/raster/test/regress/rt_histogram.sql index 2a0a0dda9..1c2efdee5 100644 --- a/raster/test/regress/rt_histogram.sql +++ b/raster/test/regress/rt_histogram.sql @@ -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 diff --git a/raster/test/regress/rt_mapalgebraexpr.sql b/raster/test/regress/rt_mapalgebraexpr.sql index 8ab2a6ebf..350fc10f5 100644 --- a/raster/test/regress/rt_mapalgebraexpr.sql +++ b/raster/test/regress/rt_mapalgebraexpr.sql @@ -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; diff --git a/raster/test/regress/rt_mapalgebrafct.sql b/raster/test/regress/rt_mapalgebrafct.sql index e7437a963..77f66bd3e 100644 --- a/raster/test/regress/rt_mapalgebrafct.sql +++ b/raster/test/regress/rt_mapalgebrafct.sql @@ -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; diff --git a/raster/test/regress/rt_mapalgebrafctngb.sql b/raster/test/regress/rt_mapalgebrafctngb.sql index 77ebd4e12..bafb6acbf 100644 --- a/raster/test/regress/rt_mapalgebrafctngb.sql +++ b/raster/test/regress/rt_mapalgebrafctngb.sql @@ -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 diff --git a/raster/test/regress/rt_mapalgebrafctngb_expected b/raster/test/regress/rt_mapalgebrafctngb_expected index f6969b12d..bb8e65b2e 100644 --- a/raster/test/regress/rt_mapalgebrafctngb_expected +++ b/raster/test/regress/rt_mapalgebrafctngb_expected @@ -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 diff --git a/raster/test/regress/rt_metadata.sql b/raster/test/regress/rt_metadata.sql index b3ca8422a..56959d276 100644 --- a/raster/test/regress/rt_metadata.sql +++ b/raster/test/regress/rt_metadata.sql @@ -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 ) ); diff --git a/raster/test/regress/rt_metadata_expected b/raster/test/regress/rt_metadata_expected index 59e38b89c..aee0e8215 100644 --- a/raster/test/regress/rt_metadata_expected +++ b/raster/test/regress/rt_metadata_expected @@ -1,2 +1,2 @@ ||||||||| -10|10|10|10|2|2|0|0|-1|1 +10|10|10|10|2|2|0|0|0|1 diff --git a/raster/test/regress/rt_quantile.sql b/raster/test/regress/rt_quantile.sql index 4f1906323..dba738488 100644 --- a/raster/test/regress/rt_quantile.sql +++ b/raster/test/regress/rt_quantile.sql @@ -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 diff --git a/raster/test/regress/rt_reclass.sql b/raster/test/regress/rt_reclass.sql index 2ec3cf573..f4753b129 100644 --- a/raster/test/regress/rt_reclass.sql +++ b/raster/test/regress/rt_reclass.sql @@ -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 diff --git a/raster/test/regress/rt_summarystats.sql b/raster/test/regress/rt_summarystats.sql index 958fb93de..12d043709 100644 --- a/raster/test/regress/rt_summarystats.sql +++ b/raster/test/regress/rt_summarystats.sql @@ -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 diff --git a/raster/test/regress/rt_valuecount.sql b/raster/test/regress/rt_valuecount.sql index 1422e8e07..ae8139f60 100644 --- a/raster/test/regress/rt_valuecount.sql +++ b/raster/test/regress/rt_valuecount.sql @@ -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 diff --git a/raster/test/regress/rt_valuepercent.sql b/raster/test/regress/rt_valuepercent.sql index a7fd2716f..377f3fd72 100644 --- a/raster/test/regress/rt_valuepercent.sql +++ b/raster/test/regress/rt_valuepercent.sql @@ -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 -- 2.40.0