[postgis-users] newbie PostGIS SQL question

kulbinder dio kulbinderdio at gmail.com
Fri Oct 6 16:34:51 PDT 2006


Hi
I've just started to use PostGIS and I'm having some difficulty constructing
the required SQL.

I've got a table with a name and a goem column made up from Latitude and
Longitude values.
I've been trying to perform queries that will return all the entries within
a given rectangle.
I have tried a few SQL queries but none of these seem to work the latest one
I have tried is the following

SELECT outcode,x,y from test where
geom && 'POLYGON((0.0418 51.3701, 0.0418 51.6273, 0.0591 51.6272, 0.0418
51.3701, 0.0418 51.3701))' ;


THis always returns back 0 rows, even though I have increased the size of
the polygon several times to cover a large area
and I know there are points within the database that should fall inside
this.

any help greatly appreciated

many thanks
dio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061007/3b2655d7/attachment.html>


More information about the postgis-users mailing list