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

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Jan 12 11:06:01 PST 2011


Good! So I'll fix them back and wait to see why Mat gets a different result if he still do so.

Pierre

>-----Original Message-----
>From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
>bounces at postgis.refractions.net] On Behalf Of Jorge Arévalo
>Sent: 12 janvier 2011 14:04
>To: PostGIS Development Discussion
>Subject: Re: [postgis-devel] [wktraster] Core tests failure for r5841
>
>2011/1/12 Jorge Arévalo <jorge.arevalo at deimos-space.com>:
>> On Wed, Jan 12, 2011 at 7:47 PM, Pierre Racine
>> <Pierre.Racine at sbf.ulaval.ca> wrote:
>>> 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
>>>
>>
>> Hi,
>>
>> In my Linux (Ubuntu 9.10) box:
>>
>> From SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10, 10,
>> 2, 2, 0, 0, -1), 1, '16BSI', -32769, NULL), 3, 3);
>>
>> I'm getting -32768
>>
>> And from SELECT St_Value(ST_AddBand(ST_MakeEmptyRaster(1000, 1000, 10,
>> 10, 2, 2, 0, 0, -1), 1, '16BSI', 210000.46, NULL), 3, 3);
>>
>> I'm getting -32768 too
>>
>> Using last version from trunk (r6604).
>>
>> Best regards,
>>
>> --
>> Jorge Arévalo
>> Internet & Mobilty Division, DEIMOS
>> jorge.arevalo at deimos-space.com
>> http://mobility.grupodeimos.com/
>> http://gis4free.wordpress.com
>> http://geohash.org/ezjqgrgzz0g
>>
>>
>
>
>Sorry, I forgot to say the result of that test was an error too. So,
>rt_addband.sql fails in my machine.
>
>
>
>>>>-----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
>>> _______________________________________________
>>> postgis-devel mailing list
>>> postgis-devel at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>
>>
>
>
>
>--
>Jorge Arévalo
>Internet & Mobilty Division, DEIMOS
>jorge.arevalo at deimos-space.com
>http://mobility.grupodeimos.com/
>http://gis4free.wordpress.com
>http://geohash.org/ezjqgrgzz0g
>_______________________________________________
>postgis-devel mailing list
>postgis-devel at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list