I am trying to detect if a geometry and a geography intersect or not. The problem is I cannot find such a method. There only is:
boolean ST_Intersects( geometry geomA , geometry geomB ); boolean ST_Intersects( geography geogA , geography geogB );
But this is not what I want, since (from my tests using the geography function) a cast is performed and not a conversion to get two geography objects.
If my geometry object is a line when I convert it to a geography object it should become a curved line. But it is still a line.
How can I perform such a computation between a geometry and a geography?
In the following example, the red lines correspond to what postgis interprets as geography (projected of course in 2D) while the black lines correspond to what postgis interprets as geometry.
From this we can see that:
- Line A as a geometry intersects line B, both as a geometry and as a geography
- Line A as a geography does not intersect line B, both as a geometry and as a geography
How can I detect the intersection between line A as a geometry and line B as a geography?