Opened 14 years ago

Closed 14 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 by pramsey, 14 years ago

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 by pramsey, 14 years ago

Patched in 1.5 branch at r5804.

comment:3 by pramsey, 14 years ago

Resolution: fixed
Status: newclosed

Patched in trunk at r5805.

Note: See TracTickets for help on using tickets.