[postgis-users] RE : Bounding Box intersection
e.j.h.polle
e.j.h.polle at gmail.com
Fri Jul 13 06:51:27 PDT 2012
Hi Ed,
Yeah, I would suggest to use ST_MakeEnvelope (which was also one of the
suggestions by Francois Hugues).
The query would look something like this:
SELECT * FROM myschema.mylinestringtable WHERE ST_Intersects(geom,
ST_MakeEnvelope(155000, 463000, 156000, 464000, 28992));
N.B. The fifht argument for ST_MakeEnvelope is the SRID of
'mylinestringtable'.
HTH,
Egge-Jan
http://twiav-tt.blogspot.nl/
On Friday, July 13, 2012 3:32:59 PM UTC+2, Francois Hugues wrote:
>
>
> Coordinates of a rectangle, you mean of thé points at the corners ?
>
> You should try st_makepolygon(st_makeline()) or st_makeenvelope.
>
> 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
>
> Hugues
>
>
> ----- Message d'origine--------
> De: postgis-users-bounces at postgis.refractions.net de la part de Ed Linde
> Date:7/2012 14
> À: PostGIS Users Discussion
> Objet : [postgis-users] Bounding Box intersection
>
> Hi All,
> I have a table with linestring geometries, and I have the co-ordinates of
> a
> rectangle/ bounding box.
> I want to get only a restricted set of geometries that lie within or
> intersect with this box. Is there a
> way to construct this box on the fly and get only the relevant set of
> geometries?
>
> Cheers,o
> Ed
>
>
> _______________________________________________
> 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/20120713/fca19c6c/attachment.html>
More information about the postgis-users
mailing list