/// <summary> /// Creates a new processor target. /// </summary> /// <param name="dynamicGraph">The graph that will be filled.</param> /// <param name="interpreter">The interpreter to generate the edge data.</param> /// <param name="edgeComparer"></param> /// <param name="tagsIndex"></param> /// <param name="idTransformations"></param> /// <param name="collectIntermediates"></param> protected DynamicGraphOsmStreamWriter( IDynamicGraphRouterDataSource <TEdgeData> dynamicGraph, IOsmRoutingInterpreter interpreter, IDynamicGraphEdgeComparer <TEdgeData> edgeComparer, ITagsCollectionIndex tagsIndex, HugeDictionary <long, uint> idTransformations, bool collectIntermediates) { _dynamicGraph = dynamicGraph; _interpreter = interpreter; _edgeComparer = edgeComparer; _tagsIndex = tagsIndex; _idTransformations = idTransformations; _preIndexMode = true; _preIndex = new OsmSharp.Collections.LongIndex.LongIndex.LongIndex(); _relevantNodes = new OsmSharp.Collections.LongIndex.LongIndex.LongIndex(); _collectIntermediates = collectIntermediates; _dataCache = new OsmDataCacheMemory(); }
/// <summary> /// Creates a new processor target. /// </summary> /// <param name="graph">The graph that will be filled.</param> /// <param name="interpreter">The interpreter to generate the edge data.</param> /// <param name="tagsIndex"></param> /// <param name="idTransformations"></param> /// <param name="collectIntermediates"></param> /// <param name="coordinates"></param> protected GraphOsmStreamTargetBase( RouterDataSourceBase <TEdgeData> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, HugeDictionary <long, uint> idTransformations, bool collectIntermediates, ICoordinateIndex coordinates) { _graph = graph; _interpreter = interpreter; _tagsIndex = tagsIndex; _idTransformations = idTransformations; _preIndexMode = true; _preIndex = new OsmSharp.Collections.LongIndex.LongIndex.LongIndex(); _relevantNodes = new OsmSharp.Collections.LongIndex.LongIndex.LongIndex(); _restricedWays = new HashSet <long>(); _collapsedNodes = new Dictionary <long, KeyValuePair <KeyValuePair <long, uint>, KeyValuePair <long, uint> > >(); _collectIntermediates = collectIntermediates; _dataCache = new OsmDataCacheMemory(); _coordinates = coordinates; }