Answers to: How can I compute a route/path of a certain length between two places?https://help.openstreetmap.org/questions/19149/how-can-i-compute-a-routepath-of-a-certain-length-between-two-places<p>Given two places in a specific region, how can I compute a path that is of certain distance (the distance is given as a parameter) which connects the two places. The resulting path should ideally be composed of roads that are visited no more than once.</p>
<p>I have learnt that this problem can be seen as a graph problem where the roads in the map represent the edges of the graph and the intersection/junctions represent the nodes of the graph. From this we can simplify the problem to finding a path of certain length for any two nodes in the graph.</p>
<p>One of my approaches to this problem can be broken into two steps:</p>
<ul>
<li>Finding the shortest path between the
two nodes (using A* or a similar
algorithm).</li>
<li>Extending/Expanding the shortest path
that is returned from A* so that it's
long enough.</li>
</ul>
<p>Now, I am not exactly sure if this approach is worth pursuing or if a better approach exists? Also, I've not come across any methods that would allow me to expand the path - are there any specific techniques that can achieve this?</p>enThu, 17 Jan 2013 00:44:04 +0000Answer by aseerel4c26https://help.openstreetmap.org/questions/19149/how-can-i-compute-a-routepath-of-a-certain-length-between-two-places/19150<p><a href="https://wiki.openstreetmap.org/wiki/Routing#Developers">https://wiki.openstreetmap.org/wiki/Routing#Developers</a> may be of interest for you, if you did not know </p>aseerel4c26Thu, 17 Jan 2013 00:44:04 +0000https://help.openstreetmap.org/questions/19149/how-can-i-compute-a-routepath-of-a-certain-length-between-two-places/19150