M
M
Max2020-05-08 19:46:30
OpenStreetMap
Max, 2020-05-08 19:46:30

Which service to choose for route calculation and how to create your own service with interactive maps?

Hello!
I don’t understand the topic of cartography yet, I studied a lot of articles on Habré and all the questions that are here.
The task is to make an online service that calculates routes and information about the route according to different parameters and under different conditions, between different countries, but first the implementation will be for Russia. Use free solutions whenever possible. In the future, the number of requests will be large. Some services will be chargeable.

Now, as I understand it, there are 2 main implementation options:

1 option:

  • Upload the osm database to yourself,
  • install a routing engine like osrm, graphhopper or others,
  • install an engine for rendering tiles,
  • write business logic for interaction with routing and tiling engines,
  • implement web front.

Of the minuses:
  • uploading and updating osm data can take quite a lot of time,
  • the server will be expensive, because the database needs a lot of resources to work,
  • probably, the engines are inferior to other online routing services in terms of capabilities, i.e. less refined.


Option 2:
  • Collect services that implement routing, such as mapbox, here, etc.,
  • select tile service.,
  • write business logic for interaction with routing services,
  • implement web front.

Of the minuses, I see only dependence on a third-party service.

Some necessary features for building routes:
  1. Determine the arrival time depending on the type of transport, roughly speaking, use transport profiles related to speed, cars / trucks, etc.;
  2. Exclude zones when building a route, for example, the Moscow Ring Road or toll roads;
  3. Determine the cost when traveling on toll roads or when using ferries;
  4. Build routes with ferries and winter roads;
  5. Build the shortest or fastest routes;
  6. Build the most optimal route if there are several points;


Questions:
  1. Did I understand the implementation of the 1st option correctly, am I missing something?
  2. How to correctly add and where to store your information to the database in the case of the 1st option, for example, some custom labels with coordinates, are the engines able to work with this data?
  3. Which engine and online service do you think is best suited for transport routing?
  4. Which engine and online service, in your opinion, is better suited for implementing the features that I indicated above?
  5. Which engine and online service do you think is best suited for Russia?
  6. Is it possible to use several engines with the same base (to increase the possibilities)?
  7. Is it possible to use multiple databases with one engine (to optimize speed)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2020-05-09
@freeExec

It's time for you to order a scientific report from the research institute with answers to all your questions. And separately for each you can read a lecture for 45 minutes.
Not a single public routing can handle all your 6 requests out of the box. Something there, Yandex stuttered about the Moscow Ring Road and the cargo profile. The cost of the ferry - I have not heard of this at all.
The truck profile itself isn't a problem, but OSM doesn't have a full database of bans for trucks, it's just not interesting for regular mappers.
And in general, I think that you should choose any and start with написать бизнес логику взаимодействия, and there already some of the questions will disappear.

S
Sergey Pankov, 2020-05-29
@trapwalker

According to the requirements, everything except the third point (about the cost) is able to osrm. It also comes with an open source frontend that can be finished.
In both of your options, you wrote some kind of nonsense.
A tiled render is deployed in a docker container in 5 minutes. Like osrm. It will be difficult to customize all this to your Wishlist, but you can.
db - postgis. There is a tool that imports a snapshot of osm data : https://wiki.openstreetmap.org/wiki/Osm2pgsql
According to the route built by osrm, then with an additional request to the database, you can pull out roads with prices

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question