[postgis-users] Different results on different Platforms: PostGIS 1.5
Ahmed Shinwari
ahmed.shinwari at gmail.com
Wed Jul 28 12:39:55 PDT 2010
Hi Luis,
Yes, the test result has been obtained by executing on Linux & Windows on
the same CPU (Intel Pentium 4 processor).
The rounding off might help. It's just that the Query 1 result value appends
a lengthy chunk of precision number. That may affect some client code e.g.,
functions that convert the output to strings may require more buffer size
than anticipated.
-Ahmed
2010/7/28 Luís de Sousa <luis.a.de.sousa at gmail.com>
> Hi Ahmed,
>
> Are we talking about the same CPU? Those differences are small enough to be
> the result of different assembler code fed into different processors.
>
> Personally, I wouldn't worry much about it. Rounding both results gets you
> equal results.
>
> Luís
>
>
>
> On Wed, Jul 28, 2010 at 5:25 PM, Ahmed Shinwari <ahmed.shinwari at gmail.com>wrote:
>
>> Hi All,
>>
>> I am using Postgres Plus 8.4 and the PostGIS 1.4 along with it. The
>> problem is that I get different results on Windows XP & Linux-32 (Red Hat 5)
>> from the same query.
>>
>> The SQL script is a bit lengthy so I have attached it with this email.
>> Please run that SQL script file on psql terminal so that all of the
>> pre-requisite Tables and Functions are created. At the end of this script
>> there are two queries. I have pasted below the two queries and there results
>> with respect to the two OS'.
>>
>>
>> QUERY 1: SELECT area(the_geom) FROM buildings;
>> -- Result on Windows XP
>> area
>> ------------------
>> 205.548500000002
>> (1 row)
>>
>> -- Result on Linux32 (Red Hat 5)
>> area
>> ------------------
>> 205.5485
>> (1 row)
>>
>>
>> QUERY 2: SELECT length(geom) FROM roads;
>> -- Result on Windows XP
>> length
>> -----------------
>> 14.142135623731
>> (1 row)
>>
>> -- Result on Linux32 (Red Hat 5)
>> length
>> -----------------
>> 14.1421356237309
>> (1 row)
>>
>>
>> The output from Query 1 is a bit bizarre. Instead of rounding and
>> truncating it on Windows, '00000002' is appended to it. Is this normal? Or
>> is it a bug. And also the output from Query 2 is different as well.
>>
>> Thanking in advance for any assistance.
>>
>>
>> Regards,
>> Ahmed
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100729/d96ebc37/attachment.html>
More information about the postgis-users
mailing list