I am interested in creating an online routing application. Supposing I have all the data I want into a postGIS database and loaded onto GeoServer and I am willing to use OpenLayers for front end, and of course I know routing algorithms like Djikstra or shortest path algorithms, what are my choices when it comes to do the actual routing.

I know many use pgRouting, and as many members of this community have told me I tried to learn it and use it. But what I want in my web app is more freedom. I want to change the algorithms and be able to whatever I imagine(academic reasearch-change the algorithms at some points).

So what are my choices ?

SQL user defined functions?

How to manipulate the data and find shortest paths?

In few words how can I create a library/extension just like pgRouting?

What languages do I need(if any) and other material?

Any good tutorials?

  • Have you read through the other popular questions tagged with routing such as Alternatives to pgRouting and Are there newer routing algorithms (than Dijkstra, A*) in GIS databases?? If so, how do their responses not answer your question? What additional information might you be looking for? – RyanKDalton Oct 8 '14 at 20:28
  • What freedom do you miss with pgRouting? It's open source, so you can even change the algorithm or add your own. – dkastl Oct 9 '14 at 0:29
  • @dkastl thanks for answering! My question is what is pgRouting made of? What programming languages would I need to change the algorithms? – drizo Oct 9 '14 at 10:55
  • @RyanDalton Hey thanks for asnwring I will check those later and tell you. Thanks for pointing them out. – drizo Oct 9 '14 at 10:55
  • @drizo pgRouting functions are written in plpgsql, the algorithms mainly in C/C++. You can find a "Getting Started for Developers" document in the project wiki: github.com/pgRouting/pgrouting/wiki/Developer---Getting-Started – dkastl Oct 9 '14 at 12:15

If you are into Java and want Flexibility, Graphhopper is an excellent alternative. Peter, the project lead, actively encourages extensions and changes and the community is very responsive.

Graphhopper works differently to Pgrouting (I use both) and it is extremely fast. Instead of using a PostGis database, Graphhopper builds its graphs direct form the .pbf extract file, which you can modify with Osmosis

One of the things I have been looking into is the ability to extract form a PostGis database for Graphhopper to build its graph to try and get the best of both worlds ie: extracting subsets of roads, building graphs dynamically, etc. Lack of time and resources has stalled this project.

| improve this answer | |
  • So Graphhopper is written in Java? The thing is that I don't know I don't want to use Java. I am already familiar with pgRouting, SQL and stuff. Thanks though for pointing it out.I may try it later. – drizo Oct 9 '14 at 10:57

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