Subject: problem with point-in-polygon

From: Peter van Oosterom <[email-masked]>
Date: Fri, 7 Feb 92 14:49:35 MET

Dear Postgres-group,

Some strange results are obtained with the point-in-polygon function
(function name is on_ppath and operator is ---`).  For example:

Go
* retrieve (test=("(0,0)"::point ---` "(1,3,0,1,1,1,1,0)"::path))\g

Query sent to backend is "retrieve (test=("(0,0)"::point ---` "(1,3,0,1,1,1,1,0)
"::path))"
---------------
| test        |
---------------
| t           |
---------------

This is not correct as (0,0) lies outside the triangle (0,1) (1,1) (1,0).
The triangle lies in the upper-right corner of the unit-square.

Kind regards, Peter van Oosterom.

---

From: postarch (Postgres Mailing Archive)
Date: Fri, 07 Feb 92 10:03:30 PST

> * retrieve (test=("(0,0)"::point ---` "(1,3,0,1,1,1,1,0)"::path))\g

This is a bug in the on_ppath() routine associated with the operator.

Jeff Meredith
[email-masked]

---

From: postarch (Postgres Mailing Archive)
Date: Sun, 17 May 92 15:16:41 PDT

Thank you for your bug report.  This bug has been fixed, and the on_ppath()
function should work correctly in the next release of postgres.

Joe Hellerstein

--------
you write:
> Query sent to backend is "retrieve (test=("(0,0)"::point ---` "(1,3,0,1,1,1,1
 +,0)