S
S
Stepan2012-02-09 21:43:17
Counts
Stepan, 2012-02-09 21:43:17

Search for transport routes?

I decided to experiment in creating (so far for myself) a public transport route search service (hereinafter OT).
I'm sure someone with similar works, faced or, at least, was interested. From what I managed to do, everything is in my head :)
The picture is as follows ...
Case number 1:
- The city.
- Many OT routes.
- More stops.
- OT can move along these routes in several directions (sometimes the route in one direction does not completely coincide with the route in the other, or the route is in the form of a loop, as on the "Circle" line).
- Routes may intersect at certain stops.
- One route can not get from the point of departure to the destination, you need to make transfers.
- A person is in a place that may be closer to one stop in distance, but not in terms of accessibility (for example, a fence or a river interferes).
- You may not be able to get there either. The nearest stop will be selected.
Case #2:
The city's road network... A HUGE graph. If we take into account the further addition of the "traffic jams" service ...
The following points are of interest:
- literature;
— examples (open projects);
- a better way to store data;
- your thoughts, experience, “I once planned / did”, etc. :)
From thoughts:
Each OT stop will have a “zone of influence”.
On the map, this looks like a "polygon" with a point inside it (stop), and not as a "circle" (like searching for a stop ina radius of "so many meters"). In this way, the search will go on in order to avoid the system suggesting as the nearest stop the one that, for example, is located on the other side of the river.
Thank you for your attention)

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Alexey Sundukov, 2012-02-09
@alekciy

And what can I say, algorithmically the problem has long been considered and even programmatically implemented. Take Dijkstra's algorithm, for example . For the task "maybe walking closer" you need to know the coordinates of all stops. A database with support for geographic objects, such as Postgresql with postgis, can help here.

V
Vitaly Peretyatko, 2012-02-09
@viperet

Look towards OSM, by the way, here is a page dedicated to public transport routes in Penza wiki.openstreetmap.org/wiki/RU : Penza/Public_transport (are you from there?)

A
akimovpro, 2012-02-10
@akimovpro

Contact the author www.rusavtobus.ru , he has already solved a similar problem

D
digdream, 2012-02-10
@digdream

there is such a service in 2gis , it shows with transfers

S
Stepan, 2012-02-10
@steff

It is interesting to hear other habrausers ;)

M
Maxim, 2015-03-22
@z17

Wandered into your topic after 3 years.
did you implement what you set out to do?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question