Beispiel #1
0
        /// <summary>
        /// Creates a router using interpreted edges.
        /// </summary>
        /// <param name="data">The data to route on.</param>
        /// <param name="basicRouter">A custom routing implementation.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(IRoutingAlgorithmData <CHEdgeData> data, IRoutingAlgorithm <CHEdgeData> basicRouter,
                                          IRoutingInterpreter interpreter)
        {
            // creates the edge router.
            var typedRouter = new TypedRouterCHEdge(
                data, interpreter, basicRouter);

            return(new Router(typedRouter)); // create the actual router.
        }
Beispiel #2
0
        /// <summary>
        /// Creates a router using live interpreted edges.
        /// </summary>
        /// <param name="data">The data to route on.</param>
        /// <param name="basicRouter">A custom routing implementation.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(IBasicRouterDataSource <CHEdgeData> data, IBasicRouter <CHEdgeData> basicRouter,
                                          IRoutingInterpreter interpreter)
        {
            // creates the live edge router.
            var liveEdgeRouter = new TypedRouterCHEdge(
                data, interpreter, basicRouter);

            return(new Router(liveEdgeRouter)); // create the actual router.
        }
Beispiel #3
0
        /// <summary>
        /// Creates a router using live interpreted edges.
        /// </summary>
        /// <param name="reader">The data to route on.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <param name="vehicle">The vehicle profile.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(OsmStreamSource reader,
                                          IOsmRoutingInterpreter interpreter, Vehicle vehicle)
        {
            var tagsIndex = new TagsTableCollectionIndex(); // creates a tagged index.

            // read from the OSM-stream.
            DynamicGraphRouterDataSource <CHEdgeData> data = CHEdgeGraphOsmStreamTarget.Preprocess(
                reader, interpreter, vehicle);

            // creates the live edge router.
            var liveEdgeRouter = new TypedRouterCHEdge(
                data, interpreter, new CHRouter());

            return(new Router(liveEdgeRouter)); // create the actual router.
        }
Beispiel #4
0
        /// <summary>
        /// Creates a router using interpreted edges.
        /// </summary>
        /// <param name="reader">The data to route on.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <param name="vehicle">The vehicle profile.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(OsmStreamSource reader,
                                          IOsmRoutingInterpreter interpreter, Vehicle vehicle)
        {
            var tagsIndex = new TagsIndex(); // creates a tagged index.

            // read from the OSM-stream.
            var data = CHEdgeGraphOsmStreamTarget.Preprocess(
                reader, interpreter, vehicle);

            // creates the edge router.
            var typedRouter = new TypedRouterCHEdge(
                data, interpreter, new CHRouter());

            return(new Router(typedRouter)); // create the actual router.
        }
Beispiel #5
0
        /// <summary>
        /// Creates a router using interpreted edges.
        /// </summary>
        /// <param name="data">The data to route on.</param>
        /// <param name="basicRouter">A custom routing implementation.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(IRoutingAlgorithmData<CHEdgeData> data, IRoutingAlgorithm<CHEdgeData> basicRouter, 
            IRoutingInterpreter interpreter)
        {
            // creates the edge router.
            var typedRouter = new TypedRouterCHEdge(
                data, interpreter, basicRouter);

            return new Router(typedRouter); // create the actual router.
        }
Beispiel #6
0
        /// <summary>
        /// Creates a router using interpreted edges.
        /// </summary>
        /// <param name="reader">The data to route on.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <param name="vehicle">The vehicle profile.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(OsmStreamSource reader,
            IOsmRoutingInterpreter interpreter, Vehicle vehicle)
        {
            var tagsIndex = new TagsIndex(); // creates a tagged index.

            // read from the OSM-stream.
            var data = CHEdgeGraphOsmStreamTarget.Preprocess(
                reader, interpreter, vehicle);

            // creates the edge router.
            var typedRouter = new TypedRouterCHEdge(
                data, interpreter, new CHRouter());

            return new Router(typedRouter); // create the actual router.
        }
Beispiel #7
0
        /// <summary>
        /// Creates a router using live interpreted edges.
        /// </summary>
        /// <param name="data">The data to route on.</param>
        /// <param name="basicRouter">A custom routing implementation.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(IBasicRouterDataSource<CHEdgeData> data, IBasicRouter<CHEdgeData> basicRouter, 
            IRoutingInterpreter interpreter)
        {
            // creates the live edge router.
            var liveEdgeRouter = new TypedRouterCHEdge(
                data, interpreter, basicRouter);

            return new Router(liveEdgeRouter); // create the actual router.
        }
Beispiel #8
0
        /// <summary>
        /// Creates a router using live interpreted edges.
        /// </summary>
        /// <param name="reader">The data to route on.</param>
        /// <param name="interpreter">The routing interpreter.</param>
        /// <param name="vehicle">The vehicle profile.</param>
        /// <returns></returns>
        public static Router CreateCHFrom(OsmStreamSource reader,
            IOsmRoutingInterpreter interpreter, Vehicle vehicle)
        {
            var tagsIndex = new TagsTableCollectionIndex(); // creates a tagged index.

            // read from the OSM-stream.
            DynamicGraphRouterDataSource<CHEdgeData> data = CHEdgeGraphOsmStreamTarget.Preprocess(
                reader, interpreter, vehicle);

            // creates the live edge router.
            var liveEdgeRouter = new TypedRouterCHEdge(
                data, interpreter, new CHRouter());

            return new Router(liveEdgeRouter); // create the actual router.
        }