Opened 6 years ago

Closed 6 years ago

#562 closed defect (fixed)

ST_DWithin gives wrong answer

Reported by: pramsey Owned by: pramsey
Priority: high Milestone: PostGIS 1.5.2
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

The following query returns the wrong answer:

select st_dwithin(
  'POLYGON( (-40.0 52.0, 102.0 -6.0, -67.0 -29.0, -40.0 52.0))'::geography, 
  'POINT(11 4)'::geography, 
  0.01);

Change History (3)

comment:1 Changed 6 years ago by pramsey

The problem is that the gbox for the polygon is being incorrectly calculated. It is not correctly recognizing that it contains the x-axis pole, which greatly underdetermines it. (Also the y-axis pole, to a lesser negative effect.)

comment:2 Changed 6 years ago by pramsey

Patched in 1.5 branch at r5804.

comment:3 Changed 6 years ago by pramsey

  • Resolution set to fixed
  • Status changed from new to closed

Patched in trunk at r5805.

Note: See TracTickets for help on using tickets.