Station

Contains information about a station.

  • id type string

    The unique station ID.

  • name type string

    The human readable station name.

  • position see Position

    The coordinates where the station is located.

Input Station

A input station is a station from user input. If the user used the auto-completion function and the station ID is available, then the id field is used to resolve the station. If this is not the case (the user just entered a string), the name field is filled with a (possibly incomplete or misspelled) station name. In the latter case, MOTIS will use the first guess from the station auto-complete to resolve the station id.

  • id type string

    The station ID if available. May be empty if name is set.

  • name type string

    The station name if no ID is available. May be empty if id is set.

Position

A geographic coordinate.

  • lat type float

    Latitude (north-south position)

  • lng type float

    Longitude (east-west position)

Interval

A time interval.

  • begin type integer

    The first time in the interval. See Times.

  • begin type integer

    The first time not in the interval. See Times.

Trip ID

This combination of information is used as key to unambiguously identify a unique service trip (bus, train, etc.). The trip ID can be split into two parts: the primary trip ID (first three parameters) and the secondary trip ID (last three parameters). In most cases, the primary trip ID should be sufficient to uniquely identify a trip.

  • station_id type string

    The station ID of the first departure.

  • train_nr type integer

    The unique train number at the first departure.

  • time type integer

    The first departure time. See Times.

  • target_station_id type string

    The final destination of the trip.

  • target_time type integer

    The arrival time at the destination.

  • line_id type string

    The line name.

PPR Search Profile

The profile to use for the Per Pedes Routing search.

  • profile required, type string

    The search profile to use.

  • duration_limit required, type integer

    The maximal time duration in seconds.

Polyline

A sequence of connected line segments.

  • coordinates array of float

    A sequence of latitude, longitude pairs.

Station Example
{
  "id": "8591379",
  "name": "Zürich, Stampfenbachplatz",
  "pos": {
    "lat": 47.380292,
    "lng": 8.542776
  }
}
Input Station Example
{
  "name": "Zürich, Stampfenbachplatz",
  "id": "8591379"
}
Position Example
{
  "lat": 47.380292,
  "lng": 8.542776
}
Interval Example
{
  "begin": 1586078940,
  "end": 1586086140
}
Trip ID Example
{
  "station_id": "8591354",
  "train_nr": 12083,
  "time": 1586005440,
  "target_station_id": "8503610",
  "target_time": 1586007660,
  "line_id": "14"
}