[pgrouting-users] Wrong results at routing by choosing wrong start/end points?

Kai Behncke Kai-Behncke at gmx.de
Fri Oct 23 08:03:33 EDT 2009


Hi Marco,

<The routing is calculated by using the nearest edge from the clicked
<my_start|end_point. But because the real start- and endpoints are a
<distance away from the start|end_on_road this could modifiy the result
<in choosing a short , but not the shortest way.


Good question. After setting start/endpoint the nearest edge is taken, in your case
the edge between a/c (start) and b/d (end)

Then the calculation is based on     $startEdge['source'] and
$endEdge['target'] of the edge. Also that,in addition to the distance of clicking-points to start|end_on_road
can create errors.

Probably in your case Vertice (A) has not the $startEdge['source'] value, right?

If I don`t misundestand your question the "killing_some_"bugs"-part of the tutorial 

http://pgrouting.postlbs.org/wiki/killing_some_bugs (and further documents)



should solve that problem.

If not please write :-)

Best regards, Kai
-------- Original-Nachricht --------
> Datum: Fri, 23 Oct 2009 11:24:31 +0200
> Von: "Marco Lechner - FOSSGIS e.V." <marco.lechner at fossgis.de>
> An: pgrouting-users at lists.postlbs.org
> Betreff: Wrong results at routing by choosing wrong start/end points?

> Hallo Kai, hi list,
> 
> because I'm trying to enhance our pgrouting-based Routing-application I
> took a look at these webpages, because they fit our needs (1. clicking
> somewhere on the map to set start and endpoint, 2. finding the nearest
> points on the routing network, 3. calculating the shortest path from
> start_on_road to end_on_road:
> http://pgrouting.postlbs.org/wiki/LoadingtheCode3 and
> http://pgrouting.postlbs.org/wiki/LoadingtheCode4
> 
> Using the code on "LoadingtheCode4" to fill the gaps between the routing
> result on "LoadingtheCode3" is good. But one question appeared:
> are the start- and endpoints calculated on "LoadingtheCode3" really on
> the shortest path from my_start_point to my_end_point?
> The routing is calculated by using the nearest edge from the clicked
> my_start|end_point. But because the real start- and endpoints are a
> distance away from the start|end_on_road this could modifiy the result
> in choosing a short , but not the shortest way.
> 
> See attached sketch for explanation. Am I getting anything wrong or is
> this really an "error"?
> 
> Marco
> 
> -- 
> +++++++++++++++++++++++++++++++++
> 
> FOSSGIS e.V.
> die unabhängige Hilfe bei freier GIS-Software und freien Geodaten
> www.fossgis.de
> 
> +++++++++++++++++++++++++++++++++

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



More information about the Pgrouting-users mailing list