From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pierre-Yves LANDURE <pylandur(at)ifremer(dot)fr> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem using ?# with polygon |
Date: | 2002-07-19 13:42:32 |
Message-ID: | 12286.1027086152@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Pierre-Yves LANDURE <pylandur(at)ifremer(dot)fr> writes:
> i'm trying to intersect a box and a polygon with ?#.. but the polygon
> seems to be automaticaly converted to a box.... so that the given result
> is false
Not surprising considering the lack of any ?# for polygons.
regression=# \do ?#
List of operators
Name | Left arg type | Right arg type | Result type | Description
------+---------------+----------------+-------------+------------------
?# | "path" | "path" | boolean | paths intersect?
?# | box | box | boolean | overlaps
?# | line | box | boolean |
?# | line | line | boolean | lines intersect?
?# | lseg | box | boolean | intersects?
?# | lseg | line | boolean |
?# | lseg | lseg | boolean | intersect?
(7 rows)
Perhaps you could coerce both to paths and look at whether the distance
(<-> operator) is zero. Not sure whether that gives quite the result
you want though.
Other alternatives: (a) write and contribute an intersection function
for point and polygon; (b) take a look at PostGIS which probably does
what you want already.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2002-07-19 13:47:43 | Re: Looking for types: phone number, email addresses |
Previous Message | Bruno Wolff III | 2002-07-19 13:31:39 | Re: select a ranking |