C# Class TrolleyTracker.Controllers.AssignStopsToRoutes

Afficher le fichier Open project: codeforgreenville/trolley-tracker-api-dot-net Class Usage Examples

Méthodes publiques

Méthode Description
UpdateRouteStops ( TrolleyTrackerContext db, int routeID, List shapePoints, List stops ) : void

Recalculate which routes the stops belong to, and the order. Call after any change to route or stops

UpdateStopsForAllRoutes ( ) : void
UpdateStopsForRoute ( TrolleyTrackerContext db, int routeID ) : void

Private Methods

Méthode Description
AngleBetween3Points ( Coordinate A, Coordinate B, Coordinate C ) : double

Find the angle between stop and A-B segment. Used to ensure that stop is only used if it's on the right side of the route

FindDistanceToSegment ( Coordinate stopPosition, Coordinate p1, Coordinate p2, Coordinate &closest ) : double
RemovePreviousRouteStops ( TrolleyTrackerContext db, int routeID ) : void

Method Details

UpdateRouteStops() public méthode

Recalculate which routes the stops belong to, and the order. Call after any change to route or stops
public UpdateRouteStops ( TrolleyTrackerContext db, int routeID, List shapePoints, List stops ) : void
db TrolleyTracker.Models.TrolleyTrackerContext
routeID int Route being recalculated
shapePoints List
stops List
Résultat void

UpdateStopsForAllRoutes() public méthode

public UpdateStopsForAllRoutes ( ) : void
Résultat void

UpdateStopsForRoute() public méthode

public UpdateStopsForRoute ( TrolleyTrackerContext db, int routeID ) : void
db TrolleyTracker.Models.TrolleyTrackerContext
routeID int
Résultat void