cota-bus

command module
v0.0.0-...-2cdd6ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 10 Imported by: 0

README

COTA Google Maps Mashup

A Google Maps mashup with real-time bus information from COTA.

Visit https://joeshaw.org/cota-bus to see it in action.

This draws heavily from my MBTA mashup from 2009. The MBTA provides a JSON API which removes the need for any server side components, but COTA's real-time data is only available via GTFS-realtime, a protobuf-based API. A Go server takes the (static, occasionally updated) GTFS data for COTA and updates it with periodic fetches of the GTFS-realtime data.

Use the tools/route-kml.go utility to regenerate the KML.

If the gtfs-realtime.proto file is updated, regenerate the protobuf with go generate. Make sure gogoprotobuf is installed.

This module is pulled into my blog via git submodules.

Possible TODOs

The server is super hacky, but it was written so that it could conceivably be generalized to any transit system that uses GTFS-realtime.

Documentation

Overview

Package main is a generated protocol buffer package.

It is generated from these files:

gtfs-realtime.proto

It has these top-level messages:

FeedMessage
FeedHeader
FeedEntity
TripUpdate
VehiclePosition
Alert
TimeRange
Position
TripDescriptor
VehicleDescriptor
EntitySelector
TranslatedString

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL