iheanyi Okeh | 29 Aug 07:26 2001
Picon

Re: Bounding Box Query

Yes, I do to both questions.

normally, In PostGIS you get the x and y of each point shape using the 
x(geometry) and y(geometry) functions.  But In our database, the geometry is 
in the field called the_geom, so you would get the x and y for each point 
using x(the_geom) and y(the_geom).

So the query below works except it is very sloooooooow.

SELECT str_num || ' ' || name as full_address,
> > >    distance(the_geom,'POINT(2227284.1963667543
> > > 1435389.6730164126)'::geometry) as dist
> > >    FROM address
> > > ORDER BY dist limit 1

It is only when I try using the overlap operator as a where predicate that 
it crashes.

>From: Tyler Mitchell <TMitchell <at> lignum.com>
>Reply-To: PostGIS Users Discussion <postgis-users <at> postgis.refractions.net>
>To: PostGIS Users Discussion <postgis-users <at> postgis.refractions.net>
>Subject: Re: [postgis-users] Bounding Box Query
>Date: Mon, 29 Mar 2004 09:15:53 -0800
>
>Do you have the x,y coordinate pair in a table in the database?
>Do you have the road data in a table too?
>
>postgis-users-bounces <at> postgis.refractions.net wrote on 03/29/2004 08:40:07
>AM:
>
(Continue reading)


Gmane