Skip to content

stevekirks/gtfs-protobuf-to-trips-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages