[postgis-users] Using a rectangular selection

Henri De Feraudy feraudyh at yahoo.com
Tue Nov 24 01:15:05 PST 2009


What you probably mean is that a query like Select geom from mytable where ST_Intersects(geom,my_rectangular_selection) is very efficient, right?Do I have to be careful to create indexes, or is that done automatically when I add a geometrical column?


--- On Tue, 11/24/09, Brian Modra <epailty at googlemail.com> wrote:

From: Brian Modra <epailty at googlemail.com>
Subject: Re: [postgis-users] Using a rectangular selection
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Date: Tuesday, November 24, 2009, 5:00 AM

2009/11/23 Henri De Feraudy <feraudyh at yahoo.com>
>
> Hi,
>   I'm working in planar coordinates. I have a Postgis database and
> for starters I want to limit my attention to all geometries that intersect a given rectangle (the "selection").
> I can imagine that one could enumerate all geometries and ask in each case if they
> intersect the rectangle, but that doesnt seem very efficient, so what do you suggest?

Use ST_Intersects

> I only need general guidance so I can look at the various parts of the doc.
> Later I'll be wanting to clip the geometies with this selection.
> Still later I'll want to consider polygonal selections.
> By the way I'm accessing the PostGis database via LibPQ and have written my application
> in Qt.
>
> Thanking you in advance
> Henri
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



--
Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa
http://www.zwartberg.com/
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091124/1a07e9b6/attachment.html>


More information about the postgis-users mailing list