/// <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);
        }
 /// <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));
 }