org.onebusaway.transit_data_federation.bundle.tasks.transit_graph
Class DistanceAlongShapeLibrary

java.lang.Object
  extended by org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.DistanceAlongShapeLibrary

@Component
public class DistanceAlongShapeLibrary
extends Object


Nested Class Summary
static class DistanceAlongShapeLibrary.DistanceAlongShapeException
           
static class DistanceAlongShapeLibrary.InvalidStopToShapeMappingException
           
static class DistanceAlongShapeLibrary.StopIsTooFarFromShapeException
           
 
Constructor Summary
DistanceAlongShapeLibrary()
           
 
Method Summary
 PointAndIndex[] getDistancesAlongShape(ShapePoints shapePoints, List<StopTimeEntryImpl> stopTimes)
           
 void setLocalMinimumThreshold(double localMinimumThreshold)
           
 void setMaxDistanceFromStopToShapePoint(double maxDistanceFromStopToShapePoint)
          If the closest distance from a stop to a shape is more than maxDistanceFromStopToShapePoint in the getDistancesAlongShape(ShapePoints, List), then a DistanceAlongShapeLibrary.StopIsTooFarFromShapeException will be thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistanceAlongShapeLibrary

public DistanceAlongShapeLibrary()
Method Detail

setLocalMinimumThreshold

public void setLocalMinimumThreshold(double localMinimumThreshold)

setMaxDistanceFromStopToShapePoint

public void setMaxDistanceFromStopToShapePoint(double maxDistanceFromStopToShapePoint)
If the closest distance from a stop to a shape is more than maxDistanceFromStopToShapePoint in the getDistancesAlongShape(ShapePoints, List), then a DistanceAlongShapeLibrary.StopIsTooFarFromShapeException will be thrown.

Parameters:
maxDistanceFromStopToShapePoint - distance in meters

getDistancesAlongShape

public PointAndIndex[] getDistancesAlongShape(ShapePoints shapePoints,
                                              List<StopTimeEntryImpl> stopTimes)
                                       throws DistanceAlongShapeLibrary.InvalidStopToShapeMappingException,
                                              DistanceAlongShapeLibrary.StopIsTooFarFromShapeException
Throws:
DistanceAlongShapeLibrary.InvalidStopToShapeMappingException
DistanceAlongShapeLibrary.StopIsTooFarFromShapeException


Copyright © 2011 OneBusAway. All Rights Reserved.