user1744557
user1744557

Reputation: 33

How to find all points along a route between two points on google map using python

I need to find latitudes and longitudes of all points that lie along the route between two points (start point and end point, both represented as lat-long pair) in the google map. I have 1 million start points and the corresponding 1 million end points. So, basically I would have 1 million routes and I need to find all points that lie along each of these 1 million routes, separately. I do not want to call google javascript api, because there is a restriction on the no of calls that one can make per day. Also, this will not scale. Can anyone please suggest, how can I do it using python and some offline api/tool for google map?

Upvotes: 1

Views: 2824

Answers (1)

user2314737
user2314737

Reputation: 29407

You say you represent a route as start/end point, you have to consider that for each pair of start and end points you can have more than one route (depending on the mode of travel, etc.).

This is why you need routing. If you don't want to use Google's directions API you can check OpenStreetMap's routing APIs or roll your own router using existing libraries and engines on OSM data.

Similar question: Calculating shortest path on maps (Google Maps, Openstreetmaps, etc)

Upvotes: 2

Related Questions