[postgis-devel] Expected behavior of rt_raster_has_no_band function
Bborie Park
dustymugs at gmail.com
Thu Oct 20 20:31:51 PDT 2011
Hey all,
I'm wondering as to the proper behavior of the rt_raster_has_no_band
function (and ST_). I'm getting the following from calls to
ST_HasNoBand...
1. SELECT ST_HasNoBand(
ST_AddBand(
ST_AddBand(
ST_AddBand(
ST_MakeEmptyRaster(2, 2, 10, 10, 2, 2, 0, 0)
, 1, '64BF', 1234.5678, NULL
)
, '64BF', 987.654321, NULL
)
, '64BF', 9876.
)
, 1)
returns FALSE
2. SELECT ST_HasNoBand(
ST_AddBand(
ST_AddBand(
ST_AddBand(
ST_MakeEmptyRaster(2, 2, 10, 10, 2, 2, 0, 0)
, 1, '64BF', 1234.5678, NULL
)
, '64BF', 987.654321, NULL
)
, '64BF', 9876.
)
, 4)
returns TRUE
3. SELECT ST_HasNoBand(
ST_AddBand(
ST_AddBand(
ST_AddBand(
ST_MakeEmptyRaster(2, 2, 10, 10, 2, 2, 0, 0)
, 1, '64BF', 1234.5678, NULL
)
, '64BF', 987.654321, NULL
)
, '64BF', 9876.
)
, 0)
returns FALSE
4. SELECT ST_HasNoBand(
ST_AddBand(
ST_AddBand(
ST_AddBand(
ST_MakeEmptyRaster(2, 2, 10, 10, 2, 2, 0, 0)
, 1, '64BF', 1234.5678, NULL
)
, '64BF', 987.654321, NULL
)
, '64BF', 9876.
)
, -1)
returns FALSE
Are the answers for #3 and #4 above correct? I expected those to be
TRUE as the band index of a raster are 1-based in PostgreSQL.
-bborie
More information about the postgis-devel
mailing list