Re: point <-> polygon not supported?

From: "Scott Ding" <scott(dot)ding(at)autodesk(dot)com>
To: "Tomasz Myrta" <jasiek(at)klaster(dot)net>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: point <-> polygon not supported?
Date: 2003-02-20 16:44:32
Message-ID: E8EF167E598AD74381DD26B7F315098A1C9892@msgpetmb1.amer.ads.autodesk.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tomasz,

Thanks for the tip. What I want to do is something like the following:

Select * from table where (table.geom <-> polygon('((3,3), (3,4), (4,5),
(5,4), (5,3))')) < 1.0);

Table.geom is a point column.

How do I modify your statement to accomplish the above?

Regards,
Scott Ding

-----Original Message-----
From: Tomasz Myrta [mailto:jasiek(at)klaster(dot)net]
Sent: Thursday, February 20, 2003 6:55 AM
To: Scott Ding
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] point <-> polygon not supported?

Scott Ding wrote:
> I'm using version 7.3.2. I got the following error when I executed the

> sql statement in psql:
<cut>
> Does this mean that the <-> operator does not support distance between
a
> point and a simple polygon?
No.

Try this query:
select o.oprname,t1.typname as left, t2.typname as right
from
pg_operator o
join pg_type t1 on (o.oprleft=t1.oid)
join pg_type t2 on (o.oprright=t2.oid)
where oprname='<->';

Regards,
Tomasz Myrta

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-02-20 17:05:58 Re: point <-> polygon not supported?
Previous Message Arunachalam Jaisankar 2003-02-20 16:40:27 How to drop all the sequences