[postgis-devel] [wktraster] Core tests failure for r5841

Mateusz Loskot mateusz at loskot.net
Sat Sep 4 11:28:20 PDT 2010


On 31/08/10 21:14, Pierre Racine wrote:
>>From thoses two lines in the rt_addband.sql file:
> 
> SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', -32769, NULL), 3, 3);
> 
> and further:
> 
> SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 210000.46, NULL), 3, 3);


Pierre,

I'm still confused why you are getting such strange values.
The value -32768 is invalid and unexpected, obviously.
It would indicate a bug.

Fortunately, I do not get such value, but I get the correct ones:

r1=# SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10,
2, 2, 0, 0, -1), 1, '16BSI', -32769, NULL), 3, 3);
WARNING:  Initial pixel value for 16BSI band got truncated from
-32769.000000 to 32767
 st_value
----------
    32767
(1 row)

r1=# SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10,
2, 2, 0, 0, -1), 1, '16BSI', 210000.46, NULL), 3, 3);
WARNING:  Initial pixel value for 16BSI band got truncated from
210000.460000 to 13392
 st_value
----------
    13392
(1 row)



Nevertheless, I've updated the expected output with correct values:

http://trac.osgeo.org/postgis/changeset/5907

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the postgis-devel mailing list