I need your help. I have a database table called 'journeys' which contains (fromlat, fromlng, tolat, tolng) and I also have another table called 'cityPostcodes' which contains (postcode, lat, lng).
Users can search journeys by just entering 'from postcode' and 'to postcode'. After mapping these postcodes to their actual physical locations, I want to calculate likely journey matches based upon these postcodes.
What I am struggling is, how to check if two journeys are heading to the same direction? for example, the journey searched by the user and those in the 'journeys
' table.