/// <summary> /// Tests preprocessing data from a PBF file. /// </summary> /// <param name="name"></param> /// <param name="pbfFile"></param> public static Stream TestSerialization(string name, string pbfFile) { var testFile = new FileInfo(string.Format(@".\TestFiles\{0}", pbfFile)); var stream = testFile.OpenRead(); var source = new OsmSharp.Osm.Streams.Filters.OsmStreamFilterProgress(); source.RegisterSource(new PBFOsmStreamSource(stream)); var data = CHEdgeGraphOsmStreamTarget.Preprocess( source, new OsmRoutingInterpreter(), Vehicle.Car); stream.Dispose(); return(CHEdgeGraphFileStreamTargetTests.TestSerialization(name, pbfFile, data)); }
/// <summary> /// Tests the CH serializer. /// </summary> /// <returns>A stream to the file that was serialized.</returns> public static Stream Test() { return(CHEdgeGraphFileStreamTargetTests.TestSerialization("CHSerializer", "kempen-big.osm.pbf")); }
/// <summary> /// Tests the CH serializer. /// </summary> /// <returns>A stream to the file that was serialized.</returns> public static Stream Test(DynamicGraphRouterDataSource <CHEdgeData> data) { return(CHEdgeGraphFileStreamTargetTests.TestSerialization("CHSerializer", "kempen-big.osm.pbf", data)); }
/// <summary> /// Tests the CH serializer. /// </summary> public static void Test() { CHEdgeGraphFileStreamTargetTests.TestSerialization("CHSerializer", "kempen-big.osm.pbf"); }