Question

Calculate nearest route


Hello Everybody,

I have a question about routes which i haven't found on the forum yet.

To start with i have a number of addresses, a dataset of the local road network and a dataset which contains only the highways. The thing i would like to calculate is what is the shortest route from each address to the nearest highway, using the road network.

 

 

I have been experimenting with the shortestpathfinder but i'm struggling with how to find the nearest route instead of a point.

 

 

Any suggestions how to solve this problem is welcome,

 

Thanks,

 

Jan


2 replies

Badge +10

For the shortest path finder, you need to know the destination, which you don't know.

Do you have points where the local road network meets the highways? You could create the from the address to the nearest x number of these points, then use the shortestpathfinder to create the path and calculate which is shortest

Badge

Here's what I have been using successfully for finding the closest highway entry:

1. add a _cost to each link of the local network -this could be the length, if each link is equally attractive to drive on. (LengthCalculator)

2. connect each entry point with an arbitrary point -say (0,0)- and apply _cost = 0 (e.g. VertexCreator and AttributeCreator)

3. make origin-destination pairs with your adresses as origin and (0,0) as destination (VertexCreator)

4. Feed the o-d lines and the local network+placeholder links to the ShortestPathFinder with the attribute _cost as cost type.

5. remove the last point of each path, being the placeholder link part (Snipper).

Reply