Closed kernelshreyak closed 2 years ago
Test first on QGIS with vector layer or GeoJSON of railway routes
Indian railway stations and routes data in GeoJSON tested on QGIS
Need to have an algorithm which can return the route based on arrival and departure stations extending over https://github.com/kernelshreyak/world-travel-simulator/commit/7536f241d0af2e80b2b28b45ce9f907b5c76c9ae
The routes are in the GeoJSON which need to be matched and queried based on coordinates of arrival and departure stations. The route should be an array of coordinates similar to other vehicle types. Since matched routes will likely be an array of LineString data, it needs to be compacted into 1D coordinate array
As per the updated stations GeoJSON, update the train routing algorithm to use exact matching instead of nearest distance because stations will always lie on one or more linestrings
Routing algorithm is improved in https://github.com/kernelshreyak/world-travel-simulator/commit/5b354f625ac4d8a119fdff7849b57336973dafef But, destination and arrival station selection is not accurate yet. Maybe need to sort the stations array to better get lowest distance match more accurate. Also, the route found is not optimal (this will be handled in new issue)
Currently only road routes are supported. Need to add routes of trains as well. Currently only Indian Railways routes will be supported for inter-state travels within india