[postgis-devel] [PostGIS] #1958: ST_Intersects(geography) returns incorrect result when called multiple times

PostGIS trac at osgeo.org
Sun Aug 19 21:31:17 PDT 2012


#1958: ST_Intersects(geography) returns incorrect result when called multiple
times
---------------------------+------------------------------------------------
 Reporter:  realityexists  |       Owner:  pramsey      
     Type:  defect         |      Status:  new          
 Priority:  medium         |   Milestone:  PostGIS 2.1.0
Component:  postgis        |     Version:  2.0.x        
 Keywords:                 |  
---------------------------+------------------------------------------------
 r10190 on Windows 7 x64

 Run the following query:
 {{{

 WITH segment_line AS
 (

         SELECT 1 AS id, 'LINESTRING(22.88333 41.96667,24.876111
 42.053361)'::geography AS line
         UNION
         SELECT 2 AS id, 'LINESTRING(22.88333 41.96667,21.32667
 42.13667)'::geography AS line

 )
 , borders AS
 (
         SELECT 'POLYGON((22.94472 41.34667,22.87528 41.99028,22.87389
 41.98472,22.87472 41.98333,22.94472 41.34667))'::geography AS border
 )
 SELECT id, ST_Intersects(line, border)
 FROM segment_line, borders
 --WHERE id = 2
 }}}

 ST_Intersects returns "false,false". However, if you run it only for line
 2 (uncomment the WHERE line) it returns "true", which is correct. On 2.0.1
 it correctly returns "false,true" when run for both lines.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1958>
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