I have a line and need to get a list of coordinates where the line crosses a polygon. A line could cross multiple polygons. A line could also only cross one edge 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 where the line intersects the polygon edge.
The basic SQL I have doesn't get me points:
SELECT trails.oid FROM trails, areas WHERE ST_Crosses(trails.geom, areas.geom);