【问题标题】:Converting gtfs rt feed (service alerts) to .pb file将 gtfs rt 提要(服务警报)转换为 .pb 文件
【发布时间】:2018-04-20 06:31:51
【问题描述】:

有什么方法可以将 gtfs 实时提要(服务警报)转换为 .pb(协议缓冲区)文件。

服务警报文件示例:https://developers.google.com/transit/gtfs-realtime/examples/alerts

【问题讨论】:

    标签: type-conversion converter protocol-buffers gtfs


    【解决方案1】:

    我想你可能会感到困惑。

    GTFS-Realtime 通常采用 Protocol Buffers 格式进行编码,该格式旨在实现高效的机器对机器通信。这不是人类可读的,所以许多服务器都包含人类可读的版本。

    由于您没有提供足够详细的来源,我无法给出具体答案,但您可能需要在 GET 参数或请求标头中指定格式以接收 protobuf。

    【讨论】:

      【解决方案2】:

      在同一页面上链接了一堆代码示例。这是 Python 的一个:https://developers.google.com/transit/gtfs-realtime/examples/python-sample

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-01-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-08-05
        相关资源
        最近更新 更多