[GraphHopper] Strange results for GraphHopper paths

Peter K peathal at yahoo.de
Tue Jul 16 05:52:36 UTC 2013


Hi Joel,

if there is a bug (which would be very important to fix), such
"flip-flop" paths could occur when the extraction of a path (Path4CH)
does not work properly.

> So far so good, but as of yesterday, making any change to the OSM file in JOSM is creating very strange paths.

It would be very good if I could somehow debug the code to see what is
going on. So I need either a failing test case with the master branch of
graphhopper or your modified fork and the data otherwise I can only pray ;)

> The reason I'm using the ngmip fork is to be able to route between these arbitrary coordinates

If you have this complete different use case you might be more happy if
you just create the graph within a new "rail reader" as you don't need
OSM attributes, no pillar/tower node optimizations, cars/bikes etc. Have
a look into the simplistic PrinctonReader where you just create edges
via g.edge and additionally you can set the coordinates via
g.setNode(internalNodeId, lat, lon), you can also create a simple
rail-FlagEncoder based on the existing car encoder for example.

Regards,
Peter.

> Hi,
> I've been using the ngmip fork of graphhopper for a bit of an
> unconventional use - to route railway segments (many would call this
> "one big hack").
>
> I've got a shapefile of all the railway lines, that's been converted
> into an OSM file with JOSM, marking ways as 'highways="primary"'. I
> then route between each unique pair of train stations in the
> Netherlands by coordinates, to be able to create national map based on
> precomputed segments, to be able to use for disruptions and individual
> trains. The reason I'm using the ngmip fork is to be able to route
> between these arbitrary coordinates - stations are often halfway
> ways/noes.
>
> So far so good, but as of yesterday, making any change to the OSM file
> in JOSM is creating very strange paths. Even the smallest change in
> totally unrelated ways is triggering "flipflopping" - see this
> screenshot: http://i.imgur.com/hqpozAi.png
> I tried doing a diff between the two OSM files, but it seems more than
> just deleting a few nodes is happening.
>
> Does anyone have a sense of what might be happening? Is this a JOSM
> bug, or is it related to how GraphHopper handles OSM? Or is this an
> issue specific to the ngmip fork?
>
> If need be, I can upload the correct and misbehaving OSM files.
>
> Thanks in advance,
>
> Joel Haasnoot
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/graphhopper
>




More information about the GraphHopper mailing list