Re: Detecting whether a point is in a box.

From: hrsuprith <hrsuprith(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Detecting whether a point is in a box.
Date: 2011-03-10 02:12:58
Message-ID: 1299723178686-3422647.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Madam,

I had the same issue tonight.

I sorted it out, perhaps it may help you :)

Convert BOX to a polygon & insert some values as per the syntax.

Than run a query

SELECT polygon '((-3,10),(8,18),(-3,30),(-10,20))' @> point '(-8,25)';

let me know if this doesn't work for you ;)

Cheers!
Rao

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Detecting-whether-a-point-is-in-a-box-tp1887472p3422647.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Black 2011-03-10 02:24:07 9.1 Trigger question
Previous Message abcdef 2011-03-10 01:51:51 output screen in psql