Exemplo n.º 1
0
        /// <summary>
        /// Creates a new referenced MultiNet 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 ReferencedMultiNetDecoder 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(ReferencedMultiNetDecoder.Create(new BasicRouterDataSource <LiveEdge>(graph), rawLocationDecoder));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new referenced MultiNet decoder.
 /// </summary>
 /// <param name="graph">The graph containing the MultiNet network.</param>
 /// <returns></returns>
 public static ReferencedMultiNetDecoder CreateBinary(IBasicRouterDataSource <LiveEdge> graph)
 {
     return(ReferencedMultiNetDecoder.Create(new BasicRouterDataSource <LiveEdge>(graph), new OpenLR.Binary.BinaryDecoder()));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new referenced MultiNet decoder.
 /// </summary>
 /// <returns></returns>
 public static ReferencedMultiNetDecoder CreateBinary(BasicRouterDataSource <LiveEdge> graph, Meter maxVertexDistance,
                                                      float candidateSearchBoxSize)
 {
     return(ReferencedMultiNetDecoder.Create(graph, new OpenLR.Binary.BinaryDecoder(), maxVertexDistance, candidateSearchBoxSize));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new referenced MultiNet 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 ReferencedMultiNetDecoder CreateBinary(string folder, string searchPattern)
 {
     return(ReferencedMultiNetDecoder.Create(folder, searchPattern, new OpenLR.Binary.BinaryDecoder()));
 }