Created
May 8, 2014 08:18
-
-
Save xivk/5e8b05ac5b303df04688 to your computer and use it in GitHub Desktop.
OsmSharp - Loading a routing flatfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for contracted files: | |
TagsCollectionBase metaTags; | |
var serializer = new OsmSharp.Routing.CH.Serialization.CHEdgeFlatfileSerializer(); | |
var data = serializer.Deserialize( | |
new FileInfo(file_name_string_here).OpenRead(), out metaTags, false); | |
var router = Router.CreateCHFrom(data, new CHRouter(), interpreter); | |
// for regular files: | |
TagsCollectionBase metaTags; | |
var serializer = new OsmSharp.Routing.Osm.Graphs.Serialization.LiveEdgeFlatfileSerializer(); | |
var data = serializer.Deserialize( | |
new FileInfo(file_name_string_here).OpenRead(), out metaTags, false); | |
var router = Router.CreateLiveFrom(data, | |
new DykstraRoutingLive(), interpreter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment