79085628

Date: 2024-10-14 09:53:09
Score: 1
Natty:
Report link

As pointed out by @Damien_The_Unbeliever the ST_INTERSECTION function is just a thin wrapper over the geometry based function and does not perform any spherical calculations. If you want to get (an approximation) of the correct result you can first segmentize the geography (which does perform spherical calcs) as below

select 
    st_astext(
        st_intersection(
            ST_Segmentize(ST_GeographyFromText('LINESTRING(-40 40, 40 40)'), 1000), 
            ST_Segmentize(ST_GeographyFromText('LINESTRING(0 30, 0 50)'), 1000)
        ))

This returns POINT(0 47.60591395513534) as expected.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Damien_The_Unbeliever
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: user1894205