Edge Data Type

This is the standard implementation of an edge with fixed from and to Vertex instances; all standard OTP edges are subclasses of this.

Abstract Type
Subtypes
AreaEdge, PathwayEdge, TemporaryPartialStreetEdge, StreetWithElevationEdge, StreetTransitEntranceLink, StreetVehicleParkingLink, ElevatorBoardEdge, FreeEdge, VehicleParkingEdge, ElevatorAlightEdge, StreetEdge, TemporaryFreeEdge, VehicleRentalEdge, SimpleEdge, StreetTransitStopLink, StreetVehicleRentalLink, StreetTransitEntityLink, ElevatorHopEdge
Implemented Interfaces
Serializable
Properties
name data type constraints description
fromVertex Vertex  
toVertex Vertex  
partial boolean required Returns true if this edge is partial - overriden by subclasses.
direction string   Get a direction on paths where it matters, or null
trip Trip   This should only be called inside State; other methods should call org.opentripplanner.routing.core.State.getBackTrip()
roundabout boolean required Edges are not roundabouts by default.
defaultName string   Returns the default name of the edge
name I18NString   Returns the name of the edge
geometry LineString  
distanceMeters number required
effectiveWalkDistance number required The distance to walk adjusted for elevation and obstacles. This is used together with the walking speed to find the actual walking transfer time. This plus getDistanceIndependentTime is used to calculate the actual-transfer-time given a walking speed.

Unit: meters. Default: 0.

distanceIndependentTime number required This is the transfer time(duration) spent NOT moving like time in in elevators, escalators and waiting on read light when crossing a street. This is used together with getEffectiveWalkDistance to calculate the actual-transfer-time.

Unit: seconds. Default: 0.

Example

This data type is abstract. The example below may be incomplete. More accurate examples can be found in subtypes pages.
{
  "fromVertex" : {
    "outgoing" : [ {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    }, {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    } ],
    "incoming" : [ {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    }, {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    } ],
    "degreeOut" : 12345,
    "degreeIn" : 12345,
    "x" : 12345.0,
    "y" : 12345.0,
    "lon" : 12345.0,
    "lat" : 12345.0,
    "name" : { },
    "defaultName" : "...",
    "stationElement" : {
      "name" : "...",
      "code" : "...",
      "description" : "...",
      "coordinate" : { },
      "wheelchairBoarding" : "NOT_POSSIBLE",
      "levelName" : "...",
      "levelIndex" : 12345.0,
      "parentStation" : { },
      "partOfStation" : true,
      "id" : { }
    },
    "label" : "...",
    "coordinate" : {
      "x" : 12345.0,
      "y" : 12345.0,
      "z" : 12345.0,
      "m" : 12345.0,
      "valid" : true
    },
    "outgoingStreetEdges" : [ {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    }, {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    } ]
  },
  "toVertex" : {
    "outgoing" : [ {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    }, {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    } ],
    "incoming" : [ {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    }, {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    } ],
    "degreeOut" : 12345,
    "degreeIn" : 12345,
    "x" : 12345.0,
    "y" : 12345.0,
    "lon" : 12345.0,
    "lat" : 12345.0,
    "name" : { },
    "defaultName" : "...",
    "stationElement" : {
      "name" : "...",
      "code" : "...",
      "description" : "...",
      "coordinate" : { },
      "wheelchairBoarding" : "NO_INFORMATION",
      "levelName" : "...",
      "levelIndex" : 12345.0,
      "parentStation" : { },
      "partOfStation" : true,
      "id" : { }
    },
    "label" : "...",
    "coordinate" : {
      "x" : 12345.0,
      "y" : 12345.0,
      "z" : 12345.0,
      "m" : 12345.0,
      "valid" : true
    },
    "outgoingStreetEdges" : [ {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    }, {
      "fromVertex" : { },
      "toVertex" : { },
      "partial" : true,
      "direction" : "...",
      "trip" : { },
      "roundabout" : true,
      "defaultName" : "...",
      "name" : { },
      "geometry" : { },
      "distanceMeters" : 12345.0,
      "effectiveWalkDistance" : 12345.0,
      "distanceIndependentTime" : 12345
    } ]
  },
  "partial" : true,
  "direction" : "...",
  "trip" : {
    "operator" : {
      "name" : "...",
      "url" : "...",
      "phone" : "...",
      "id" : { }
    },
    "tripOperator" : {
      "name" : "...",
      "url" : "...",
      "phone" : "...",
      "id" : { }
    },
    "route" : {
      "branding" : { },
      "agency" : { },
      "operator" : { },
      "shortName" : "...",
      "longName" : "...",
      "desc" : "...",
      "gtfsType" : 12345,
      "mode" : "AIRPLANE",
      "url" : "...",
      "color" : "...",
      "textColor" : "...",
      "bikesAllowed" : "NOT_ALLOWED",
      "sortOrderSet" : true,
      "sortOrder" : 12345,
      "flexibleLineType" : "...",
      "name" : "...",
      "netexSubmode" : "...",
      "id" : { }
    },
    "serviceId" : {
      "feedId" : "...",
      "id" : "..."
    },
    "mode" : "SUBWAY",
    "netexSubmode" : "...",
    "tripShortName" : "...",
    "internalPlanningCode" : "...",
    "tripHeadsign" : "...",
    "routeShortName" : "...",
    "direction" : "ANTICLOCKWISE",
    "blockId" : "...",
    "shapeId" : {
      "feedId" : "...",
      "id" : "..."
    },
    "wheelchairAccessible" : 12345,
    "bikesAllowed" : "UNKNOWN",
    "fareId" : "...",
    "tripAlteration" : "CANCELLATION",
    "id" : {
      "feedId" : "...",
      "id" : "..."
    }
  },
  "roundabout" : true,
  "defaultName" : "...",
  "name" : { },
  "geometry" : {
    "closed" : true,
    "endPoint" : {
      "boundaryDimension" : 12345,
      "x" : 12345.0,
      "coordinates" : [ { }, { } ],
      "coordinate" : { },
      "simple" : true,
      "numPoints" : 12345,
      "dimension" : 12345,
      "boundary" : { },
      "geometryType" : "...",
      "coordinateSequence" : { },
      "empty" : true,
      "y" : 12345.0,
      "length" : 12345.0,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "envelopeInternal" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "userData" : { },
      "envelope" : { },
      "valid" : true
    },
    "dimension" : 12345,
    "empty" : true,
    "numPoints" : 12345,
    "geometryType" : "...",
    "coordinateSequence" : {
      "measures" : 12345,
      "dimension" : 12345
    },
    "length" : 12345.0,
    "boundaryDimension" : 12345,
    "startPoint" : {
      "boundaryDimension" : 12345,
      "x" : 12345.0,
      "coordinates" : [ { }, { } ],
      "coordinate" : { },
      "simple" : true,
      "numPoints" : 12345,
      "dimension" : 12345,
      "boundary" : { },
      "geometryType" : "...",
      "coordinateSequence" : { },
      "empty" : true,
      "y" : 12345.0,
      "length" : 12345.0,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "envelopeInternal" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "userData" : { },
      "envelope" : { },
      "valid" : true
    },
    "coordinates" : [ {
      "x" : 12345.0,
      "y" : 12345.0,
      "z" : 12345.0,
      "m" : 12345.0,
      "valid" : true
    }, {
      "x" : 12345.0,
      "y" : 12345.0,
      "z" : 12345.0,
      "m" : 12345.0,
      "valid" : true
    } ],
    "coordinate" : {
      "x" : 12345.0,
      "y" : 12345.0,
      "z" : 12345.0,
      "m" : 12345.0,
      "valid" : true
    },
    "boundary" : {
      "length" : 12345.0,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "boundary" : { },
      "boundaryDimension" : 12345,
      "numPoints" : 12345,
      "coordinates" : [ { }, { } ],
      "dimension" : 12345,
      "envelopeInternal" : { },
      "empty" : true,
      "coordinate" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "simple" : true,
      "userData" : { },
      "geometryType" : "...",
      "envelope" : { },
      "valid" : true
    },
    "ring" : true,
    "numGeometries" : 12345,
    "precisionModel" : {
      "scale" : 12345.0,
      "floating" : true,
      "maximumSignificantDigits" : 12345,
      "type" : { },
      "offsetX" : 12345.0,
      "offsetY" : 12345.0
    },
    "interiorPoint" : {
      "boundaryDimension" : 12345,
      "x" : 12345.0,
      "coordinates" : [ { }, { } ],
      "coordinate" : { },
      "simple" : true,
      "numPoints" : 12345,
      "dimension" : 12345,
      "boundary" : { },
      "geometryType" : "...",
      "coordinateSequence" : { },
      "empty" : true,
      "y" : 12345.0,
      "length" : 12345.0,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "envelopeInternal" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "userData" : { },
      "envelope" : { },
      "valid" : true
    },
    "rectangle" : true,
    "area" : 12345.0,
    "envelopeInternal" : {
      "width" : 12345.0,
      "null" : true,
      "diameter" : 12345.0,
      "area" : 12345.0,
      "minY" : 12345.0,
      "height" : 12345.0,
      "maxX" : 12345.0,
      "maxY" : 12345.0,
      "minX" : 12345.0
    },
    "centroid" : {
      "boundaryDimension" : 12345,
      "x" : 12345.0,
      "coordinates" : [ { }, { } ],
      "coordinate" : { },
      "simple" : true,
      "numPoints" : 12345,
      "dimension" : 12345,
      "boundary" : { },
      "geometryType" : "...",
      "coordinateSequence" : { },
      "empty" : true,
      "y" : 12345.0,
      "length" : 12345.0,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "envelopeInternal" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "userData" : { },
      "envelope" : { },
      "valid" : true
    },
    "factory" : {
      "precisionModel" : { },
      "SRID" : 12345,
      "coordinateSequenceFactory" : { }
    },
    "SRID" : 12345,
    "simple" : true,
    "userData" : { },
    "envelope" : {
      "length" : 12345.0,
      "numGeometries" : 12345,
      "precisionModel" : { },
      "interiorPoint" : { },
      "rectangle" : true,
      "area" : 12345.0,
      "boundary" : { },
      "boundaryDimension" : 12345,
      "numPoints" : 12345,
      "coordinates" : [ { }, { } ],
      "dimension" : 12345,
      "envelopeInternal" : { },
      "empty" : true,
      "coordinate" : { },
      "centroid" : { },
      "factory" : { },
      "SRID" : 12345,
      "simple" : true,
      "userData" : { },
      "geometryType" : "...",
      "envelope" : { },
      "valid" : true
    },
    "valid" : true
  },
  "distanceMeters" : 12345.0,
  "effectiveWalkDistance" : 12345.0,
  "distanceIndependentTime" : 12345
}