NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

# How can I compute a route/path of a certain length between two places?

 0 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. 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. One of my approaches to this problem can be broken into two steps: Finding the shortest path between the two nodes (using A* or a similar algorithm). Extending/Expanding the shortest path that is returned from A* so that it's long enough. 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? asked 16 Jan '13, 23:28 Sadeer 176●8●9●14 accept rate: 0%

 1 https://wiki.openstreetmap.org/wiki/Routing#Developers may be of interest for you, if you did not know answered 17 Jan '13, 00:44 aseerel4c26 ♦ 32.6k●18●248●554 accept rate: 18%

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Question tags:

×535
×179
×95
×18

question asked: 16 Jan '13, 23:28

question was seen: 6,455 times

last updated: 17 Jan '13, 00:44

### Related questions

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum