/// <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; }
/// <summary> /// Initializes the processing. /// </summary> public override void Initialize() { _coordinates = new CoordinateIndex(); }
/// <summary> /// Creates a new osm edge data processing target. /// </summary> /// <param name="graph">The graph.</param> /// <param name="interpreter">Inteprets the OSM-data.</param> /// <param name="tagsIndex">Holds all the tags.</param> /// <param name="coordinates"></param> public GraphOsmStreamTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, ICoordinateIndex coordinates) : this(graph, interpreter, tagsIndex, null, true, coordinates) { }
/// <summary> /// Creates a new osm edge data processing target. /// </summary> /// <param name="graph">The graph.</param> /// <param name="interpreter">Inteprets the OSM-data.</param> /// <param name="tagsIndex">Holds all the tags.</param> /// <param name="vehicles">The vehicle profiles to build routing information for.</param> /// <param name="collectIntermediates">The collect intermediates flag.</param> /// <param name="coordinates">The coordinates index.</param> public GraphOsmStreamTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, IEnumerable <Vehicle> vehicles, bool collectIntermediates, ICoordinateIndex coordinates) : base(graph, interpreter, tagsIndex, new HugeDictionary <long, uint>(), collectIntermediates, coordinates) { _vehicles = new HashSet <Vehicle>(); if (vehicles != null) { foreach (Vehicle vehicle in vehicles) { _vehicles.Add(vehicle); } } }
/// <summary> /// Creates a new osm edge data processing target. /// </summary> /// <param name="dynamicGraph"></param> /// <param name="interpreter">Inteprets the OSM-data.</param> /// <param name="tagsIndex">Holds all the tags.</param> /// <param name="coordinates"></param> public LiveGraphOsmStreamTarget(IDynamicGraphRouterDataSource <LiveEdge> dynamicGraph, IOsmRoutingInterpreter interpreter, ITagsCollectionIndex tagsIndex, ICoordinateIndex coordinates) : this(dynamicGraph, interpreter, tagsIndex, null, true, coordinates) { }
/// <summary> /// Creates a new osm edge data processing target. /// </summary> public GraphOsmStreamTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, ICoordinateIndex coordinates) : this(graph, interpreter, tagsIndex, null, true, coordinates, (g) => { return(new HilbertSortingPreprocessor <Edge>(g)); }) { }