[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Using a rectangular selection
From:       Brian Modra <epailty () googlemail ! com>
Date:       2009-11-24 15:28:10
Message-ID: 5a9699850911240728i5536c5aet54cc497460034890 () mail ! gmail ! com
[Download RAW message or body]

2009/11/24 Henri De Feraudy <feraudyh@yahoo.com>
> 
> 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 <epailty@googlemail.com> wrote:
> 
> From: Brian Modra <epailty@googlemail.com>
> Subject: Re: [postgis-users] Using a rectangular selection
> To: "PostGIS Users Discussion" <postgis-users@postgis.refractions.net>
> Date: Tuesday, November 24, 2009, 5:00 AM
> 
> 2009/11/23 Henri De Feraudy <feraudyh@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@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@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users@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@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic