/// <summary> /// Creates a new referenced Osm decoder. /// </summary> /// <param name="folder">The folder containing the shapefile(s).</param> /// <param name="searchPattern">The search pattern to identify the relevant shapefiles.</param> /// <param name="rawLocationDecoder">The raw location decoder.</param> /// <returns></returns> public static ReferencedOsmDecoder Create(string folder, string searchPattern, Decoder rawLocationDecoder) { // create an instance of the graph reader and define the columns that contain the 'node-ids'. var graphReader = new ShapefileLiveGraphReader("JTE_ID_BEG", "JTE_ID_END"); // read the graph from the folder where the shapefiles are placed. var graph = graphReader.Read(folder, searchPattern, new ShapefileRoutingInterpreter()); return(ReferencedOsmDecoder.Create(new BasicRouterDataSource <LiveEdge>(graph), rawLocationDecoder)); }
/// <summary> /// Creates a new referenced Osm decoder. /// </summary> /// <param name="graph">The graph containing the Osm network.</param> /// <returns></returns> public static ReferencedOsmDecoder CreateBinary(IBasicRouterDataSource <LiveEdge> graph) { return(ReferencedOsmDecoder.Create(new BasicRouterDataSource <LiveEdge>(graph), new OpenLR.Binary.BinaryDecoder())); }
/// <summary> /// Creates a new referenced Osm decoder. /// </summary> /// <param name="graph">The graph containing the Osm network.</param> /// <param name="maxVertexDistance">The maximum vertex distance.</param> /// <returns></returns> public static ReferencedOsmDecoder CreateBinary(BasicRouterDataSource <LiveEdge> graph, Meter maxVertexDistance) { return(ReferencedOsmDecoder.Create(graph, new OpenLR.Binary.BinaryDecoder(), maxVertexDistance)); }
/// <summary> /// Creates a new referenced Osm decoder. /// </summary> /// <param name="folder">The folder containing the shapefile(s).</param> /// <param name="searchPattern">The search pattern to identify the relevant shapefiles.</param> /// <returns></returns> public static ReferencedOsmDecoder CreateBinary(string folder, string searchPattern) { return(ReferencedOsmDecoder.Create(folder, searchPattern, new OpenLR.Binary.BinaryDecoder())); }