[pgrouting-users] Which method to use?

Daniel Kastl daniel at georepublic.de
Tue Jan 31 07:26:08 EST 2012

On Tue, Jan 31, 2012 at 8:53 PM, Dave Potts <dave.potts at pinan.co.uk> wrote:

> Many Thanks Steve, much clearer,
> The Google Summer of code solutions, do they work ?
> I am trying to work out how to use the Driving Distance version, the one
> documented at http://www.pgrouting.org/docs/1.x/dd.html

Hi Dave,

The documentation only contains the "core" functions. For convenience there
are additional functions in separate .sql files, that we call "wrapper"
functions. They are sometimes more convenient and easy to use, but they
often contain assumptions like ID column must be named "gid" for example,

I must admit that there is no standard way how these wrapper are written,
because they were just added as examples at that time. Unfortunately nobody
took the time to organize them in better way and add them to the

> I am confused as to what the distance function should be set up, but the
> page
> http://underdark.wordpress.com/2011/05/13/catchment-areas-with-pgrouting-driving_distance/
> Is very helpful which describes this value as
> 'the only new value is “distance”. That’s the maximum distance/cost you
> want to be contained in the result set. “distance” has to be specified in
> the same units as the cost attribute (which is specified in the “sql” text
> parameter).'

There are several attributes or parameters that depend on your projection
unit. assign_vertex_id function has a "snapping" parameters that cares
about the unit. And shortest path wrapper functions do this, too. I think
it's also mentioned in the pgRouting tutorial.

This wrapper for example (undocumented, sorry!) has the same name as the
driving_distance function, but you pass different parameters:
Instead of a set of point ID's with costs it returns a polygon geometry.
In this wrapper function the "distance" is also used to select only a
bounding box area of the network data. Therefor "distance" and "cost" need
to be in the same unit as your projection. Otherwise it's like you said,
that distance and cost can be anything, but need to be in the same unit.


> Dave.
> Stephen Woodbridge wrote:
> > On 1/30/2012 5:26 PM, Dave Potts wrote:
> >>
> >> Is there a generic introduction which list what each of the route method
> >> does and why I would what to use it with a given data set/
> >
> > There is a tutorial
> >      http://www.pgrouting.org/docs/foss4g2008/index.html
> > and here is my assessment:
> >
> > Dijkstra solution:
> > This is a node based solution that converts a graph into a tree and the
> > tree has all nodes that are reachable from the start node. This is used
> > in the driving distance solution and has other applications where you
> > might want the cost to get to multiple node. The default output is to
> > only return that path from the start node to the destination node.
> >
> > Astar search solution:
> > This is a modified Dijkstra solver that uses a Heuristic to direct the
> > solver to the destination node. As a result, the graph solution is
> > typically faster the Dijkstra because you only have to solve part of the
> > graph needed to find the solution.
> >
> > ShootingStar solution:
> > This is an edge based solver. IT IS CURRENT BROKEN! and as best as I can
> > tell the last version that worked is v1.03. It is current running
> > significantly (2-4x slower than the above two solutions). The reason it
> > was created was because it support turn restrictions.
> >
> > These are the main three solvers.
> >
> > We just added a new branch TRSP (turn restricted shortest pat
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120131/08a0dace/attachment.html

More information about the Pgrouting-users mailing list