1

I am thinking to create a website where people can share car journeys. Users can register a car journey and other users can find a journey.

At the moment, when a user registers a journey, I save the starting and ending lat & lng of that journey in a database table called journeys. Other users can search a journey by entering their source and destination postcodes (postcodes a mapped to their lat and lng).

How can I know if a certain journey passes near the user searched destination postcode?

For example, a journey starts from location A and ends at location C but it passes location B. A user wants to find a journey from A to B.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
  • 1
    Unless you store more than start and finish, you have zero knowledge about the in-between. They might have taken a detour to the north pole. – bugmenot123 Sep 24 '16 at 19:14
  • You are right, but I think it is impossible to save every point or location that the journey is going through? do you have any suggestion? – Programm-ist Sep 24 '16 at 19:18
  • 1
    You probably need to look at route traveled and it's proximity to point B – Midavalo Sep 24 '16 at 19:47

0 Answers0