[postgis-users] newbie PostGIS SQL question

Markus Schaber schabi at logix-tt.com
Sat Nov 25 01:12:38 PST 2006

Hi, dio,

kulbinder dio wrote:

> 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.

Can you give us the output of "SELECT extent(geom) FROM test"?

Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org

More information about the postgis-users mailing list