Example #1
0
        /// <summary>
        /// Creates a new referenced MultiNet encoder.
        /// </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="rawLocationEncoder">The raw location encoder.</param>
        /// <returns></returns>
        public static ReferencedMultiNetEncoder Create(string folder, string searchPattern, Encoder rawLocationEncoder)
        {
            // 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(ReferencedMultiNetEncoder.Create(new BasicRouterDataSource <LiveEdge>(graph), rawLocationEncoder));
        }
Example #2
0
 /// <summary>
 /// Creates a new referenced MultiNet encoder.
 /// </summary>
 /// <param name="graph">The graph containing the MultiNet network.</param>
 /// <returns></returns>
 public static ReferencedMultiNetEncoder CreateBinary(BasicRouterDataSource <LiveEdge> graph)
 {
     return(ReferencedMultiNetEncoder.Create(graph, new OpenLR.Binary.BinaryEncoder()));
 }
Example #3
0
 /// <summary>
 /// Creates a new referenced MultiNet encoder.
 /// </summary>
 /// <param name="graph">The graph containing the MultiNet network.</param>
 /// <returns></returns>
 public static ReferencedMultiNetEncoder CreateBinary(IBasicRouterDataSource <LiveEdge> graph)
 {
     return(ReferencedMultiNetEncoder.CreateBinary(new BasicRouterDataSource <LiveEdge>(graph)));
 }
Example #4
0
 /// <summary>
 /// Creates a new referenced MultiNet encoder.
 /// </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 ReferencedMultiNetEncoder CreateBinary(string folder, string searchPattern)
 {
     return(ReferencedMultiNetEncoder.Create(folder, searchPattern, new OpenLR.Binary.BinaryEncoder()));
 }