I would like to programmatically figure out whether they intersect or not. So, I do:
select ST_Intersects ( ( select ST_SetSRID(ST_Buffer(ST_Transform(ST_SetSRID((p.geom), 4326), 26986), 50), 4326) from point p where p.id = 25785 ) , ( select ST_SetSRID(ST_MakeLine(ST_SetSRID(p.geom, 4326)), 4326) FROM point p where p.trajectory_id = 1455 ) );
But when I run the query, PostGIS says that they do not intersect!! But on the picture above we definitely see that they intersect (or line crosses the polygon).
What is the problem?
I also tried
ST_Crosses function, but it also gives false.