https://github.com/stevekirks/gtfs-protobuf-to-trips-rs
https://github.com/stevekirks/gtfs-protobuf-to-trips-rs
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stevekirks/gtfs-protobuf-to-trips-rs
- Owner: stevekirks
- Created: 2021-07-03T06:04:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-07T00:50:02.000Z (almost 4 years ago)
- Last Synced: 2025-02-11T18:45:44.894Z (3 months ago)
- Language: Rust
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GTFS Protobuf to Trips (in Rust)
This project contains code to take a short timespan of GTFS Realtime data from a protobuf feed and tranform it for visualisation on a loop in deck.gl trips.
I wrote it in Rust as a learning experience.
### Usage
Clone this repo, set data specific settings in the AppSettings class in `main.rs`. Then:
```
cargo run
```### Protobuf rust file generation
`gtfs_realtime.rs` was generated from
```
extern crate protoc;
extern crate protoc_rust;use protoc_rust::Codegen;
fn main() {
Codegen::new()
.protoc_path("C:/dev/temp/protobuf/protoc.exe")
.out_dir("src/protos")
.include("C:/dev/temp/protobuf/")
.inputs(&["C:/dev/temp/protobuf/gtfs-realtime.proto"])
.run()
.expect("protoc");
}
```
and `Cargo.toml`
```
...
[dependencies]
protoc = "2.24"
protoc-rust = "2.24"
```