/// <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)); }) { }
/// <summary> /// Creates a CH data processing target. /// </summary> public CHEdgeGraphOsmStreamTarget(RouterDataSourceBase <CHEdgeData> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, Vehicle vehicle) : this(graph, interpreter, tagsIndex, vehicle, (g) => { return(new DefaultPreprocessor(g)); }) { }
/// <summary> /// Creates a new osm edge data processing target. /// </summary> public GraphOsmStreamTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, IEnumerable <Vehicle> vehicles, bool collectIntermediates) : this(graph, interpreter, tagsIndex, vehicles, collectIntermediates, new CoordinateIndex(), (g) => { return(new HilbertSortingPreprocessor <Edge>(g)); }) { }
/// <summary> /// Creates a CH data processing target. /// </summary> /// <param name="graph"></param> /// <param name="interpreter"></param> /// <param name="tagsIndex"></param> /// <param name="vehicle"></param> public CHEdgeGraphOsmStreamTarget(RouterDataSourceBase <CHEdgeData> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, Vehicle vehicle) : base(graph, interpreter, tagsIndex) { if (!graph.IsDirected) { throw new ArgumentOutOfRangeException("Only directed graphs can be used for contraction hiearchies."); } _vehicle = vehicle; }
/// <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 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> /// 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> protected GraphOsmStreamTargetBase(RouterDataSourceBase <TEdgeData> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex) : this(graph, interpreter, tagsIndex, new HugeDictionary <long, uint>(), true, new CoordinateIndex()) { }
/// <summary> /// Creates a reference stream target. /// </summary> /// <param name="graph"></param> /// <param name="interpreter"></param> /// <param name="tagsIndex"></param> /// <param name="vehicles"></param> public ReferenceGraphTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, IEnumerable <Vehicle> vehicles) : base(graph, interpreter, tagsIndex, vehicles, false) { }
/// <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> public GraphOsmStreamTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, IEnumerable <Vehicle> vehicles, bool collectIntermediates) : this(graph, interpreter, tagsIndex, vehicles, collectIntermediates, 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 reference stream target. /// </summary> /// <param name="graph"></param> /// <param name="interpreter"></param> /// <param name="tagsIndex"></param> /// <param name="vehicles"></param> public ReferenceGraphTarget(RouterDataSourceBase<Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, IEnumerable<Vehicle> vehicles) : base(graph, interpreter, tagsIndex, vehicles, false) { }
/// <summary> /// Creates a new osm edge data processing target. /// </summary> public GraphOsmStreamTarget(RouterDataSourceBase <Edge> graph, IOsmRoutingInterpreter interpreter, ITagsIndex tagsIndex, Func <GraphBase <Edge>, IPreprocessor> createPreprocessor) : this(graph, interpreter, tagsIndex, null, true, new CoordinateIndex(), createPreprocessor) { }