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

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Jan 12 10:47:08 PST 2011


Jorge, Regina,

I get a fresh build of PostGIS raster and the regress test in rt_addband.sql fail on my machine. It was modified by Mateusz which was obtaining different results.

In the first case:

SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', -32769, NULL), 3, 3);

Mateusz gets 32767 and I get -32768

In the second case:

SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10, 2, 2, 0, 0, -1), 1, '16BSI', 210000.46, NULL), 3, 3);

Mateusz gets 13392 and I get -32768

I suspect this is a Windows/Linux difference. Do the test works/fails for you? What results do you get?

Pierre

>-----Original Message-----
>From: Mateusz Loskot [mailto:mateusz at loskot.net]
>Sent: 4 septembre 2010 14:28
>To: PostGIS Development Discussion
>Cc: Pierre Racine
>Subject: Re: [postgis-devel] [wktraster] Core tests failure for r5841
>
>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