Closed vastafev closed 8 years ago
I'll try to tests this; make sure you are using the latest version of Itinero both when creating the routerdb and when routing using it.
I recently fixed a bug that caused this kind of errors...
I got the latest version and get the same effect. using (var _stream = File.Open(new FileInfo(filename).FullName, FileMode.Create, FileAccess.ReadWrite)) { routerDb.Serialize(_stream); _stream.Close(); }
using (var stream = File.Open(file.FullName, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
{
routerDb = RouterDb.Deserialize(stream);
}
Ok, I just updated the functional test project with these lines and ran the routing tests after without errors.
Perhaps it depends on the source data? What country/data are you loading?
For reference, this is what I did:
using (var stream = File.Open("temp.routerdb", FileMode.Create, FileAccess.ReadWrite))
{
routerDb.Serialize(stream);
stream.Flush();
stream.Close();
}
using (var stream = File.Open("temp.routerdb", FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
{
routerDb = RouterDb.Deserialize(stream);
}
router = new Router(routerDb);
Russia, Novosibirsk region I've just downloaded develop branch build it and got same error. Are yours test contain contracted db?
Yes, it has a contracted db, I added the code above right after this line:
https://github.com/itinero/routing/blob/develop/test/Itinero.Test.Functional/Program.cs#L77
After that 100 random routes are tested. Where can I download this region?
Is there any progress? Can I do something to help?
Hi! I have a problem with serialization/deserialisation routerdb. After i serialize/deserialize routerdb with contracted db, i get multiple exceptions "Cannot build vertex path, edge {0} -> {1} not found." from public static EdgePath BuildEdgePath.
Exception does not appear when graph is build from osm.pbf file.
It does not matter is ContractedDb vertex-based or edge-based.
If i build routerdb from osm.pbf then serialize/deserialize and AddContracted - Exception appears also.
I noticed that most of vertexes are neighbours:
Cannot build vertex path, edge 506196 -> 506197 not found.
Cannot build vertex path, edge 233711 -> 233710 not found.
Cannot build vertex path, edge 327184 -> 327183 not found.
Cannot build vertex path, edge 246937 -> 246936 not found.
Cannot build vertex path, edge 17285 -> 17284 not found.
Cannot build vertex path, edge 127953 -> 127952 not found.
Cannot build vertex path, edge 342934 -> 342933 not found.
Cannot build vertex path, edge 390288 -> 81578 not found.
Cannot build vertex path, edge 327184 -> 327183 not found.
Cannot build vertex path, edge 127953 -> 127952 not found.
Cannot build vertex path, edge 382741 -> 382740 not found.
Cannot build vertex path, edge 368624 -> 368656 not found.
Cannot build vertex path, edge 49462 -> 49461 not found.
Cannot build vertex path, edge 493653 -> 493654 not found.