}
private String getTransitLegBuilderAsPath(TransitLegBuilder builder) {
BlockTripInstance blockTripInstanceFrom = builder.getBlockTripInstanceFrom();
BlockTripEntry blockTrip = blockTripInstanceFrom.getBlockTrip();
TripEntry trip = blockTrip.getTrip();
AgencyAndId shapeId = trip.getShapeId();
if (shapeId == null)
return null;
ShapePoints shapePoints = _shapePointService.getShapePointsForShapeId(shapeId);
BlockStopTimeEntry fromStop = null;
BlockStopTimeEntry toStop = null;
if (builder.getFromStop() != null)
fromStop = builder.getFromStop().getBlockStopTime();
if (builder.getToStop() != null)
toStop = builder.getToStop().getBlockStopTime();
CoordinatePoint nextPoint = null;
BlockTripEntry nextBlockTrip = builder.getNextTrip();
if (nextBlockTrip != null) {
TripEntry nextTrip = nextBlockTrip.getTrip();
AgencyAndId nextShapeId = nextTrip.getShapeId();
if (nextShapeId != null) {
ShapePoints nextShapePoints = _shapePointService.getShapePointsForShapeId(nextShapeId);
nextPoint = nextShapePoints.getPointForIndex(0);
}