Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a set of N coordinates (addresses). My goal is to compute the shortest driving route through the set of coordinates, where the algorithm (not the user) decides which of the N coordinates should be the start point and which of the N - 1 coordinates (excluding the start point) should be the end point.

Can this be done and which algorithms are used for this kind of routing?

By assuming that the routing can be done using the arial distance between the coordinates instead of roads, how could I then solve my problem?

At this stage of my questioning, I am trying to determine how to solve the problem in theory but the tools at hand are a PostGIS database and anything I can implement my self in C# .NET. If any free libraries can help me, then they can be considered too :)

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Travelling Salesman is supported by pgRouting: http://www.pgrouting.org/docs/1.x/index.html, so no need to implement something yourself if you alread have PostGIS at hand.

share|improve this answer
add comment

This is known as the Travelling Salesman Problem. To do want you want, you would probably first calculate all your driving distances between the N points, then use one of the known algorithms to solve the problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.