/// <summary> /// Generates instructions. /// </summary> /// <param name="planner"></param> /// <param name="route"></param> /// <param name="point"></param> /// <returns></returns> public static List <Instruction> Generate(MicroPlanner planner, Route route, AggregatedPoint point) { if (point == null) { throw new ArgumentNullException("route"); } if (planner == null) { throw new ArgumentNullException("planner"); } return(planner.Plan(route, point)); }
/// <summary> /// Generates instructions. /// </summary> /// <param name="planner"></param> /// <param name="route"></param> /// <returns></returns> public static List <Instruction> Generate(MicroPlanner planner, Route route) { if (route == null) { throw new ArgumentNullException("route"); } var aggregator = new ArcAggregator(planner.Interpreter); var point = aggregator.Aggregate(route); if (point == null) { // returns an empty list because of an empty route. return(new List <Instruction>()); } return(InstructionGenerator.Generate(planner, route, point)); }
/// <summary> /// Generates instructions. /// </summary> /// <param name="planner"></param> /// <param name="point"></param> /// <param name="interpreter"></param> /// <param name="languageGenerator"></param> /// <returns></returns> public static List <Instruction> Generate(MicroPlanner planner, AggregatedPoint point, IRoutingInterpreter interpreter, ILanguageGenerator languageGenerator) { if (point == null) { throw new ArgumentNullException("route"); } if (planner == null) { throw new ArgumentNullException("planner"); } if (interpreter == null) { throw new ArgumentNullException("interpreter"); } if (languageGenerator == null) { throw new ArgumentNullException("languageGenerator"); } return(planner.Plan(point)); }
/// <summary> /// Generates instructions. /// </summary> /// <param name="planner"></param> /// <param name="route"></param> /// <param name="interpreter"></param> /// <param name="languageGenerator"></param> /// <returns></returns> public static List <Instruction> Generate(MicroPlanner planner, Route route, IRoutingInterpreter interpreter, ILanguageGenerator languageGenerator) { if (route == null) { throw new ArgumentNullException("route"); } if (route.Vehicle == null) { throw new InvalidOperationException("Vehicle not set on route: Cannot generate instruction for a route without a vehicle!"); } if (interpreter == null) { throw new ArgumentNullException("interpreter"); } if (languageGenerator == null) { throw new ArgumentNullException("languageGenerator"); } var aggregator = new ArcAggregator(interpreter); var point = aggregator.Aggregate(route); return(InstructionGenerator.Generate(planner, point, interpreter, languageGenerator)); }
public PoiMachine(MicroPlanner planner) : base(PoiMachine.Initialize(), planner, 1000) { }
public PoiWithTurnMachine(MicroPlanner planner) : base(PoiWithTurnMachine.Initialize(), planner, 1001) { }
/// <summary> /// Creates a new POI machine. /// </summary> /// <param name="planner">The planner.</param> public PoiMachine(MicroPlanner planner) : base(planner, 1000) { }
/// <summary> /// Creates a new roundabout machine. /// </summary> /// <param name="planner">The planner.</param> public RoundaboutMachine(MicroPlanner planner) : base(planner, 200) { }
/// <summary> /// Creates a new immidiate turn machine. /// </summary> /// <param name="planner">The planner.</param> public ImmidateTurnMachine(MicroPlanner planner) : base(planner, 101) { }
/// <summary> /// Generates instructions. /// </summary> /// <param name="planner"></param> /// <param name="route"></param> /// <param name="interpreter"></param> /// <returns></returns> public static List <Instruction> Generate(MicroPlanner planner, Route route, IRoutingInterpreter interpreter) { return(InstructionGenerator.Generate(planner, route, interpreter, new OsmSharp.Routing.Instructions.LanguageGeneration.Defaults.EnglishLanguageGenerator())); }
public ImmidateTurnMachine(MicroPlanner planner) : base(ImmidateTurnMachine.Initialize(), planner, 101) { }
/// <summary> /// Creates a new POI with turn machine. /// </summary> /// <param name="planner">The planner.</param> public PoiWithTurnMachine(MicroPlanner planner) : base(planner, 1001) { }
/// <summary> /// Creates a new turn machine. /// </summary> /// <param name="planner"></param> public TurnMachine(MicroPlanner planner) : base(TurnMachine.Initialize(), planner, 100) { }
public RoundaboutMachine(MicroPlanner planner) : base(RoundaboutMachine.Initialize(), planner, 200) { }
/// <summary> /// Creates a new turn machine. /// </summary> /// <param name="planner">The planner.</param> public TurnMachine(MicroPlanner planner) : base(planner, 100) { }