Hi Ed,<br><br><br>Yeah, I would suggest to use ST_MakeEnvelope (which was also one of the suggestions by Francois Hugues).<br><br>The query would look something like this:<br>SELECT * FROM myschema.mylinestringtable WHERE ST_Intersects(geom, ST_MakeEnvelope(155000, 463000, 156000, 464000, 28992));<br><br>N.B. The fifht argument for ST_MakeEnvelope is the SRID of 'mylinestringtable'.<br><br>HTH,<br><br>Egge-Jan<br>http://twiav-tt.blogspot.nl/<br><br><br>On Friday, July 13, 2012 3:32:59 PM UTC+2, Francois Hugues wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>Coordinates of a rectangle, you mean of thé points at the corners ?
<br>
<br>You should try st_makepolygon(st_makeline()) or st_makeenvelope.
<br>
<br>Postgis manual is very useful, you should also try it to learn how these function work and which one is tthe better one for you
<br>
<br>Hugues
<br>
<br>
<br>----- Message d'origine--------
<br>De: <a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.<wbr>refractions.net</a> de la part de Ed Linde
<br>Date:7/2012 14
<br>À: PostGIS Users Discussion
<br>Objet : [postgis-users] Bounding Box intersection
<br>
<br>Hi All,
<br>I have a table with linestring geometries, and I have the co-ordinates of a
<br>rectangle/ bounding box.
<br>I want to get only a restricted set of geometries that lie within or
<br>intersect with this box. Is there a
<br>way to construct this box on the fly and get only the relevant set of
<br>geometries?
<br>
<br>Cheers,o
<br>Ed
<br>
<p><br>______________________________<wbr>_________________
<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.<wbr>refractions.net</a>
<br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.<wbr>net/mailman/listinfo/postgis-<wbr>users</a>
<br></p></blockquote>