• Перевод:
  • Обзор
  • Виды каналов
  • Изменения в рейсах
  • Предупреждения
  • Координаты транспорта
  • Описание
  • Примеры
  • Предупреждения
  • Изменения в рейсах
  • gtfs-realtime.proto
  • Изменения
  • Что такое GTFS-realtime?

    Перевод версии от 26 июля 2012

    В процессе перевода

    GTFS-realtime — формат, позволяющий транспортным предприятиям предоставлять данные о своём подвижном составе в реальном времени. Данный формат является расширнением для GTFS (General Transit Feed Specification) — формата для расписаний общественного транспорта и сопутствующей геопространственной информации. GTFS-realtime разрабатывался с расчётом на простоту реализации, хорошую совместимость с GTFS и ориентированностью на информирование пассажиров.

    Спецификация была разработана в рамках сотрудничества перевозчиков-партнёров Live Transit Updates, нескольких разработчиков, занимающихся пассажирскими перевозками, и Гугла. Спецификация была введена и опубликованна на условиях лицензии Creative Commons Attribution 3.0 в августе 2011 года.

    С чего начать?

    1. Прочитать обзор до конца.
    2. Решить какие виды каналов будете поддерживать.
    3. Взглянуть на примеры.
    4. Создать свой собственный канал, используя описание.
    5. Опубликовать свой канал.

    Обзор видов каналов GTFS-realtime

    Эта спецификация в настоящее вермя поддерживает следующие виды информации:

    • Изменения в рейсах — переносы, отмены, изменения маршрутов
    • Предупреждения — переносы остановок, непредвиденные проишествия, затрагивающие станции, маршруты или всю сеть
    • Координаты транспорта — информация о подвижном составе, включая координаты и заполненность

    Обновления для каждого вида предоставляются в отдельном канале. Каналы предоставляются по HTTP-протоколу и часто обновляются. Feeds are served via HTTP and updated frequently. The file itself is a regular binary file, so any type of webserver can host and serve the file (other transfer protocols might be used as well). Alternatively, web application servers could also be used which as a response to a valid HTTP GET request will return the feed. There are no constraints on how frequently nor on the exact method of how the feed should be updated or retrieved.

    Because GTFS-realtime allows you to present the actual status of your fleet, the feed needs to be updated regularly - preferably whenever new data comes in from your Automatic Vehicle Location system.

    More about Feed types...

    Data format

    The GTFS-realtime data exchange format is based on Protocol Buffers.

    Protocol buffers are a language- and platform-neutral mechanism for serializing structured data (think XML, but smaller, faster, and simpler). The data structure is defined in a gtfs-realtime.proto file, which then is used to generate source code to easily read and write your structured data from and to a variety of data streams, using a variety of languages – e.g. Java, C++ or Python.

    More about Protocol Buffers....

    Data structure

    The hierarchy of elements and their type definitions are specified in the gtfs-realtime.proto file.

    This text file is used to generate the necessary libraries in your choice of programming language. These libraries provide the classes and functions needed for generating valid GTFS-realtime feeds. The libraries not only make feed creation easier but also ensure that only valid feeds are produced.

    More about the data structure...

    Getting Help

    To participate in discussions around GTFS-realtime and suggest changes and additions to the specification, join the GTFS-realtime discussion group.

    Google Maps and Live Transit Updates

    One of the possible applications that uses GTFS-realtime is Live Transit Updates, a feature within Google Maps that provides users with realtime transit information. If you are working for a public transportation agency that is interested in providing realtime updates to Google Maps, please visit the Google Transit Partner Page.

    Оригинал: https://developers.google.com/transit/gtfs-realtime/