Re: BUG #5889: "Intersects" for polygons broken - Mailing list pgsql-bugs

From Konrad Garus
Subject Re: BUG #5889: "Intersects" for polygons broken
Date
Msg-id AANLkTinUcLmpNGM4gBdyX=1BrQDRLEghh09OEUwa0h0+@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5889: "Intersects" for polygons broken  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5889: "Intersects" for polygons broken
List pgsql-bugs
2011/2/16 Tom Lane <tgl@sss.pgh.pa.us>:
> "Konrad Garus" <konrad.garus@gmail.com> writes:
>> && operator seems to be broken for polygons whose bounding boxes interse=
ct:
>
>> select polygon'((0,0), (1,2), (0,2))' && polygon'((0.5, 0), (1,0), (1,1)=
)';
>> =A0?column?
>> ----------
>> =A0t
>> (1 row)
>
> This is fixed as of 9.0; see the release notes at
> http://www.postgresql.org/docs/9.0/static/release-9-0.html
> which say
>
> =A0 =A0 =A0 =A0Correct calculations of "overlaps" and "contains" operatio=
ns for polygons (Teodor Sigaev)
>
> =A0 =A0 =A0 =A0The polygon && (overlaps) operator formerly just checked t=
o see
> =A0 =A0 =A0 =A0if the two polygons' bounding boxes overlapped. It now doe=
s a
> =A0 =A0 =A0 =A0more correct check. The polygon @> and <@ (contains/contai=
ned
> =A0 =A0 =A0 =A0by) operators formerly checked to see if one polygon's ver=
texes
> =A0 =A0 =A0 =A0were all contained in the other; this can wrongly report "=
true"
> =A0 =A0 =A0 =A0for some non-convex polygons. Now they check that all line
> =A0 =A0 =A0 =A0segments of one polygon are contained in the other.

Thank you. How about the point of more informative docs that would
explain supported types, automatic conversions and all such caveats
(also for 8.3 and 8.4)?

--=20
Konrad Garus

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5889: "Intersects" for polygons broken
Next
From: "Emmanuel"
Date:
Subject: BUG #5890: malloc error