[postgis-devel] How do you obtain the line that touches a polygon?
googling1000
googling1000 at yahoo.com
Thu May 29 14:43:12 PDT 2008
Hi,
I have one polygon, and a line lies exactly on an edge of that polygon.
How do I obtain that line?
Please take a look at a picture here:
http://googling1000.googlepages.com/example.jpg
(I drew the lines using different thickness so it is easy to understand
where each segment ended)
The line segment A is touching the polygon P, and I'd like to write a query
statement that will fetch me that line.
I tried ST_intersects and ST_Touches, but the queries return 0 rows.
Then, I tried && which is another intersection command?
This is the query statment:
select ST_AsText(myline.the_geom) from myline,mypoly where mypoly.the_geom
&& myline.the_geom AND mypoly.polynum = '11'
Note that 11 is the number associated with polygon P
I was hoping to get only the A segment, but I got all A,B,C segments as a
result. why is that?
How do I obtain segment A?
Help will be highly appreciated.
--
View this message in context: http://www.nabble.com/How-do-you-obtain-the-line-that-touches-a-polygon--tp17462947p17462947.html
Sent from the PostGIS - Dev mailing list archive at Nabble.com.
More information about the postgis-devel
mailing list