pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
polygon overlay
2+ messages / 2 participants
[nested] [flat]

* polygon overlay
@ 2010-08-31 21:14 Gary Fu <gfu@sigmaspace.com>
  2010-09-01 13:42 ` Re: polygon overlay Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Gary Fu @ 2010-08-31 21:14 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I don't see any overlap between the polygon and the box in the following 
sql. Can anyone explain why it returns 't'?

  select polygon(path '((0,0),(10,10),(20,10),(10,0))') && polygon(box 
'((16,0),(17,1))');
  ?column?
----------
  t
(1 row)

Thanks,
Gary



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: polygon overlay
  2010-08-31 21:14 polygon overlay Gary Fu <gfu@sigmaspace.com>
@ 2010-09-01 13:42 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2010-09-01 13:42 UTC (permalink / raw)
  To: Gary Fu <gfu@sigmaspace.com>; +Cc: pgsql-sql

Gary Fu <gfu@sigmaspace.com> writes:
> I don't see any overlap between the polygon and the box in the following 
> sql. Can anyone explain why it returns 't'?

>   select polygon(path '((0,0),(10,10),(20,10),(10,0))') && polygon(box 
> '((16,0),(17,1))');
>   ?column?
> ----------
>   t
> (1 row)

Up to 8.4 the poly_overlap function did this:

 * Determine if polygon A overlaps polygon B by determining if
 * their bounding boxes overlap.
 *
 * XXX ought to do a more correct check!

I see it's been improved for 9.0 ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-09-01 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-08-31 21:14 polygon overlay Gary Fu <gfu@sigmaspace.com>
2010-09-01 13:42 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox