Answer the question
In order to leave comments, you need to log in
Need advice. Download search algorithm. What are your suggestions for DBMS architecture?
Never worked before with similar tasks . Need advice!
There is a code that uses geocoding for 2 addresses and an open street map to build a route.
In the json column - the response from the open street map API is written.
Such routes are stored in a table
transportation_orders (id, user_id, driver_id, lat_from, lon_from, lat_to, lon_to, json)
1, 1, null, 50.11123, 30.2524, 35.11123, 10.2524, {...}
transportation_orders
, all navigation coordinates from "A" to "B" are processed to an accuracy of 0.01 from lat, lon. and stored in order_waypoints (order_id, lat, lon, progress_from, progress_to )
.1, 50.11, 30.25, 0% , 0,1222%
1, 50.12, 30.25, 0,1222% , 0,2233%
...
1, 35.11, 10.24, 98.881% , 99.594%
1, 35.11, 10.25, 98.594% , 100%
. Answer the question
In order to leave comments, you need to log in
Master the Buffer operation - and it will be clear whether routes pass nearby or not.
With the opposite direction, I did not understand at all what the difficulty was. If you have to load a ride at 65% and unload at 30%, then obviously it will not work.
This is more of a philosophical question.
According to the Input data, how would I build:
There is a route A -> B
There is a product C -> D
There is a car that goes E
I would get a route from the map if it is possible E -> B and (E -> C -> D -> B) and (E -> C -> B -> D)
If the difference in routes does not exceed ...%, then choose the best route and load
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question