2009/11/24 Henri De Feraudy <[email protected]> > > 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?
yes you need to add the gist index, otherwise it will be slow. > > > --- On Tue, 11/24/09, Brian Modra <[email protected]> wrote: > > From: Brian Modra <[email protected]> > Subject: Re: [postgis-users] Using a rectangular selection > To: "PostGIS Users Discussion" <[email protected]> > Date: Tuesday, November 24, 2009, 5:00 AM > > 2009/11/23 Henri De Feraudy <[email protected]> > > > > 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 > > [email protected] > > 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 > [email protected] > http://postgis.refractions.net/mailman/listinfo/postgis-users > > _______________________________________________ > postgis-users mailing list > [email protected] > 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 [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
