-3

So here's my question. Supposing that one is about to create an online web appliation that takes as user input a current location and a location for destination, and displays as a result one of the 5-6 available routes that are stored in a database that is most suitable in terms of distance,and Open Street Map data and Open Layers are used which would be the best way to make this happen?

What I am asking for is what would I need for: 1.Storing the data in database 2.Do the routing calculations. If I would like to change a bit the algorithms for academic reasons and have more control of my final result how would I do that? Do I need any programming language? Any good tutorials? 3.What is the difference between using pgRouting and using any custom solution(like mentioned above)? Doing the all the coding again by myself would be like reinventing the wheel? 4.What would be best for a commercial website, where fast calculations would be needed?

UPDATE: What I need is a way to connect 1.user input(as geometry points) 2.Routing algorithm I have written 3.Road Network and return a result in terms of best way to go to a point

drizo
  • 267
  • 6
  • 14
  • I love the down votes. Please explain to me why you down vote. So cool to down vote without reasoning. – drizo Sep 28 '14 at 19:58
  • if there's osmething wrong with the post please let me know.I am pretty new to all this! – drizo Sep 28 '14 at 21:13
  • The downvotes (I was not one of them) are because asking for software recommendations is considered off topic on Stack Overflow because it might attract opinionated answers -- whether you agree or not, that is how it is. I suggest you read the help guide, if you are unclear about any of this. Now, for your question, I would suggest you look at pgRouting which is built on Postgres. – John Powell Sep 29 '14 at 05:24
  • Hello my friend John Barca thanks for answering this and all of my previous questions. I don't understand. Is pgRouting an online router or not? what online routers do? – drizo Sep 29 '14 at 07:51
  • @JohnBarça Thanks for the resources the think is I know all these algorithms because I am in the field of operations reearch.And for academic reasons I would need to change the algorithms a bit. So I thought I could do it manually by myself using a programing language.Is this possible? – drizo Sep 29 '14 at 08:05
  • @JohnBarça supposing I want it all to be on a website. – drizo Sep 29 '14 at 08:17
  • Then just select one of the available online routers, for example OSRM or GraphHopper, and modify it for your needs. – scai Sep 29 '14 at 08:20
  • @scai thanks I will google that stuff . Online routers they just upload the road network to your page and you can do whatever you want? – drizo Sep 29 '14 at 09:43
  • No. Online router means, the router has a usual backend and the frontend is accessibly via a webpage. You will still need a local database containing the road network. – scai Sep 29 '14 at 10:05
  • Hmm ok.This is not what I need then. I need something to connect my road network data with a routing algorithm that I have written and the input and return the directions. – drizo Sep 29 '14 at 10:08
  • @JohnBarça My friend,supposing I have two points on a map in a random city can I connect the two points through the city's road network using any postGIS function ? I just want to connect, there are there is not routing algorithm or distance calculations? – drizo Sep 29 '14 at 10:28
  • pgRouting would be better. Suggest you read about it. – John Powell Sep 29 '14 at 10:29
  • @JohnBarça Ok thank you! I wish there was a way to show you the respect I have for you guys,you have helped me a numerous times ! – drizo Sep 29 '14 at 10:34

1 Answers1

1

Please see the list of online routers and offline routers for OSM as well as the general wiki page about routing with OSM.

If that still doesn't answer your questions, ask a more specific one.

scai
  • 20,297
  • 4
  • 56
  • 72
  • hey my friend @scai , thanks for answering this question and others that I have asked. What I am asking is not online routers is the components of the backend I need to write the algorithms on my own. What would I need to connect the road network to my database and give the result? would it be reinventing the wheel? – drizo Sep 29 '14 at 07:45
  • Your question title askes for a tool. The solution depends on what you really want to do. Probably lots of the routers (both online and offline) listed in the wiki can be used for your purposes. They all do have a backend part and several of them will provide an easy way of modifying the algorithm, at least the weightings. – scai Sep 29 '14 at 07:55
  • Yes, you would be reinventing the wheel. But, start with http://en.wikipedia.org/wiki/Dijkstra's_algorithm – John Powell Sep 29 '14 at 07:56