I've been looking for a function that can tell me if a LineString intersects itself. I've tried calling
st_intersects with the same LineString twice, but obviously identical linestrings will intersect. My plan if there is no function would be to get all the points in the line string, and create individual linestrings and then check each new linestring against each other one with st_intersects. I do not want it to come to this, but I'm afraid it will.
So are there any PostGIS functions for checking if a linestring is self-intersecting? It should be similar to finding out whether a polygon is complex I'd assume