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