itinero / routing

The routing core of itinero.
Apache License 2.0
221 stars 69 forks source link

Cannot deserialize meta-data db: Invalid version #: 2 when deserializing contractions #211

Closed jonwagner closed 6 years ago

jonwagner commented 6 years ago

Using:

Either one of these files:

When I convert the OSM file to a routerdb file AND include a car contraction with:

./idp-2/idp --read-pbf texas-latest.osm.pbf --pr --create-routerdb vehicles=car --contract car --write-routerdb texas.routerdb

Reading the routerdb file with:

using (var stream = File.OpenRead(filename))
    return RouterDb.Deserialize(stream);

Throws the following exception:

An unhandled exception of type 'System.Exception' occurred in Itinero.dll: 'Cannot deserialize meta-data db: Invalid version #: 2, upgrade Itinero.'
   at Itinero.Data.Network.Edges.MetaCollectionDb.Deserialize(Stream stream, ArrayProfile profile)
   at Itinero.RouterDb.Deserialize(Stream stream, RouterDbProfile profile)

But looking at MetaCollectionsDb.cs, I don't see anything that writes a version 2 MetaCollectionDb.

jonwagner commented 6 years ago

Before you look into it, let me try it with the latest idp+itinero.

jonwagner commented 6 years ago

This seems to be an issue with mismatched versions. I was able to properly load a routerdb with contractions as long as it was the same version of the codebase. In this case, I was able to achieve it with the develop branch.

You can close this issue if you don't think it's important.