Re: Problem on Geometric functions

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Silke Trissl <trissl(at)informatik(dot)hu-berlin(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Problem on Geometric functions
Date: 2005-01-20 10:04:45
Message-ID: 20050120100444.GB37770@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jan 20, 2005 at 10:39:47AM +0100, Silke Trissl wrote:

> Table "reference.coord_test"
> Column | Type | Modifiers
> -------------+---------+-----------
> node_name | integer |
> plane_coord | point |
>
>
> I would like to find all points from the table that are within a square.

Try this:

SELECT plane_coord
FROM reference.coord_test
WHERE plane_coord @ box'((0,0), (2,2))';

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mihail Nasedkin 2005-01-20 10:45:58 OID's
Previous Message Michael Fuhr 2005-01-20 09:51:16 Re: SQL timestamp to date cast