From: Tom Lane <tgl@sss.pgh.pa.us>
To: Gary Fu <gfu@sigmaspace.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: polygon overlay
Date: Wed, 01 Sep 2010 09:42:10 -0400
Message-ID: <23341.1283348530@sss.pgh.pa.us> (raw)
In-Reply-To: <i5jrbg$1nph$1@news.hub.org>
References: <i5jrbg$1nph$1@news.hub.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, gfu@sigmaspace.com
Subject: Re: polygon overlay
In-Reply-To: <23341.1283348530@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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