How do I get the points where a line crosses a polygon?

المشرف العام

Administrator
طاقم الإدارة
I have a line and need to get a list of coordinates (points) where the line crosses the polygon(s). A line could cross multiple polygons. A line could also only cross one side of polygon, if the line starts inside the polygon.

ST_CROSSES returns a bool indicating if the line crosses but I need the actual coordinates.

The basic SQL I have doesn't get me points:

SELECT trails.oidFROM trails, areasWHERE ST_Crosses(trails.geom, areas.geom);

أكثر...
 
أعلى