[postgis-users] St_intersection

pcreso at pcreso.com pcreso at pcreso.com
Mon Mar 19 12:25:49 PDT 2012


Whenever the intersection of two lines is a linestring.

eg: 
select astext(ST_intersection(ST_makeline(ST_Makepoint(0,0), ST_Makepoint(1,1)),ST_Makeline(ST_Makepoint(0.5, 0.5), ST_Makepoint(1.5,1.5))));
         astext          
-------------------------
 LINESTRING(0.5 0.5,1 1)
(1 row)

Brent

--- On Tue, 3/20/12, Bob Pawley <rjpawley at shaw.ca> wrote:

From: Bob Pawley <rjpawley at shaw.ca>
Subject: [postgis-users] St_intersection
To: postgis-users at postgis.refractions.net
Date: Tuesday, March 20, 2012, 6:44 AM





Hi
 
I am querying a geometry looking for intersection point between a line and 
an other geometry.
 
The return is 2 points and 2 linestrings. (when I use st_union a geometry 
collection results)
 
Can anyone tell me under what conditions that a st_intersection would 
return a linestring??
 
insert into num_search (the_geom3)
select st_intersection(Num_Search.the_geom1, entities.wkb_geometry) 
from entities, Num_Search
where Num_Search.seq = 'R'
and st_intersects(entities.wkb_geometry, Num_Search.the_geom1) = True
 
Bob

-----Inline Attachment Follows-----

_______________________________________________
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/20120319/8beb3c49/attachment.html>


More information about the postgis-users mailing list