On Wed, Jul 01, 2015 at 04:09:40PM +0200, Patrick Niklaus wrote:
> Checked the supposedly broken routes, indeed they all have exactly the
> same length. So yes this is down to non-deterministic node ordering
> caused by parallel sorting/parsing. We can't fix this, it is just a
> side-effect of parallel parsing done by osmium and parallel sorting.
> It might be desirable to have consistent soriting, but not at the cost
> of removing parallelization.
> So this isn't a bug after all.

So why does it randomly return an alternate route and sometimes dont?

I have all permutations route A + alternate B - route B with alternate A
- Route A without alternate and Route B without alternate.

It would be okay for me if the route i got last can be found in the
alternates but that does not work reliably.

> The "random" JSON ordering is due to using `std::unordered_map` (you
> might guess the effect of that from its name).

Does it really do an "unsort"? I mean even an unordered map returns
element always in a deterministic way either be order of adding,
reverse, alphabetical, backend storage. 

Flo
-- 
Florian Lohoff                                                 [email protected]
     We need to self-defense - GnuPG/PGP enable your email today!

Attachment: signature.asc
Description: Digital signature

_______________________________________________
OSRM-talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osrm-talk

Reply via email to