English|Українська
The source code can be found in main.cpp. The released app was built with GNU GCC 5.1.0 with parameters -std=c++11 -Wall -O2
.
The app uses the Breadth-first search algorithm to find the path between two nodes. This path will have the least amount of nodes.
- Download any .osm file with an area where you want to find a way. Rename this file to input.osm and put it in the same folder where the app executable is located.
- Run the app.
- Enter the id of the start and the finish nodes of the way.
- Has the app output "Program successfully executed!"? If yes, congratulations!
Open a generated map.html in any web browser. It has a map with the way marked on it.
- Start opening JOSM.
- At the same time, open a generated JOSM.txt.
- Copy its content into the clipboard.
- In JOSM, open File>Download object... (Ctrl+Shift+O):
- In the list Object type choose node.
- Check that the field Object ID has the copied text.
- Unflag Download referrers (parent relations).
- Flag Separate Layer.
- Done!
The app was tested in 2020 only on Windows 10. It was compatible with exported data from OpenStreetMap and overpass turbo. If the data has too many nodes, the memory for the algorithm may be overflowed (I guess so).