Skip to content

leg

One continuous movement on a single vehicle — takeoff to landing, boarding to alighting, pickup to dropoff. No transfers within a leg.

A nonstop flight is one leg. A connecting flight has one leg per segment. A direct Uber ride is one leg. A multi-stop Uber ride has one leg per stop pair.

MetadataValue
Plurallegs
Subtitle fieldflightNumber
FieldType
sequenceinteger
departureTimedatetime
arrivalTimedatetime
durationstring
durationMinutesinteger
flightNumberstring
cabinClassstring
vehicleTypestring
layoverMinutesinteger
carbonEmissionsjson
tracejson
tracePointCountinteger
polylinestring
RelationTarget
originplace
destinationplace
carrierorganization
aircraftaircraft
triptrip

External standards this shape draws from or aligns with. See Shape design principles for how prior art informs shape design.

  • IATA NDC “segment” — NDC segment = our leg. flightNumber, departureTime, arrivalTime, cabinClass come straight from NDC OfferItem Segment.
  • GTFS stop_times.txt — Transit leg model. Our sequence = stop_sequence; departureTime/ arrivalTime = arrival_time/departure_time.
  • Google Encoded Polyline Algorithm — Our polyline field is the standard Google encoded polyline. trace is a denser GPS breadcrumb alternative (GeoJSON-adjacent).