Shortest path between raw geo coordinates and a node of a graph
问题 I have implemented a simple Dijkstra's algorithm for finding the shortest path on an .osm map with Java. The pathfinding in a graph which is created from an .osm file works pretty well. But in case the user's current location and/or destination is not a node of this graph (just raw coordinates) how do we 'link' those coordinates to the graph to make pathfinding work? The simple straightforward solution "find the nearest to the current location node and draw a straight line" doesn't seem to be