[postgis-devel] [PostGIS] #703: measures test failure

PostGIS trac at osgeo.org
Mon Dec 13 01:14:02 PST 2010


#703: measures test failure
---------------------+------------------------------------------------------
 Reporter:  strk     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by nicklas):

 Hallo

 Yes, I have seen this too. I think it is just a precision issue. As you
 say it doesn't show on linux 64 bit, and I have also found that I don't
 get it on windows.

 I have thought about how to handle it (if it just is a precision issue)

 The problem is that when I apply st_snaptogrid the return is null because
 the zero-length line is not valid and the second repeated point is
 removed.

 So this falls back a little to the question if the design is right to
 deliberate output an invalid geometry. SQL-server choosed not to and
 instead return NULL from the function in their new  ShortestLineTo.

 But if we should keep this (I like it this way) and we should test this
 "special case" which I think we should, then I guess we have to split the
 answer in ST_Startpoint and ST_Endpoint and put ST_Snapto grid on those.

 Does that sound ok?

 Or first, of course. Is it just a precision problem? The size of the error
 I think points that way. The error is quite, very, very small.

 What is also interesting I think is that we had the same division with
 linux 32 bit giving one answer and linux 64 and windows giving another.
 But in that case ubuntu 32 seemed more accurate. That is described with a
 lot of messy postings from myself in #503. There it seems like ubuntu 64
 and windows "rounded" their answers to multiples of 2 raised to ome small
 number I don't remember. Can that be the same thing happening here, that
 the linux 32 bit answer actually is the right answer including a floating
 point error and that ubuntu 64 and windwso hides this hides this very
 small error by some rounding mechanism.

 I am just brainstorming, but I find it a little peculiar that we see the
 difference between linux 64/windows and linux 32 again.

 /Nicklas

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/703#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list