コード例 #1
0
        /// <summary>
        /// Preprocesses the data from the given OsmStreamReader and converts it directly to a routable data source.
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="tagsIndex"></param>
        /// <param name="interpreter"></param>
        /// <returns></returns>
        public static DynamicGraphRouterDataSource <LiveEdge> Preprocess(OsmStreamSource reader,
                                                                         ITagsIndex tagsIndex,
                                                                         IRoutingInterpreter interpreter)
        {
            var dynamicGraphRouterDataSource =
                new DynamicGraphRouterDataSource <LiveEdge>(tagsIndex);
            var targetData = new LiveGraphOsmStreamWriter(dynamicGraphRouterDataSource, interpreter, dynamicGraphRouterDataSource.TagsIndex);

            targetData.RegisterSource(reader);
            targetData.Pull();

            return(dynamicGraphRouterDataSource);
        }
コード例 #2
0
 /// <summary>
 /// Preprocesses the data from the given OsmStreamReader and converts it directly to a routable data source.
 /// </summary>
 /// <param name="reader"></param>
 /// <param name="interpreter"></param>
 /// <returns></returns>
 public static DynamicGraphRouterDataSource <LiveEdge> Preprocess(OsmStreamSource reader,
                                                                  IRoutingInterpreter interpreter)
 {
     return(LiveGraphOsmStreamWriter.Preprocess(reader, new SimpleTagsIndex(), interpreter));
 }