Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtfs realtime pbf is empty? #131

Open
terrafrost opened this issue Aug 2, 2022 · 0 comments
Open

gtfs realtime pbf is empty? #131

terrafrost opened this issue Aug 2, 2022 · 0 comments

Comments

@terrafrost
Copy link

I'm using a JavaScript module generated by this library for GTFS Realtime to load https://data.texas.gov/Transportation/CapMetro-Vehicle-Positions-PB-File/eiei-9rpf and the result I'm getting back is empty.

Here's my code:

fetch('https://data.texas.gov/download/eiei-9rpf/application%2Foctet-stream', {mode: 'no-cors'}).then(function(result) {
	var bufferRes = result.arrayBuffer();
	var pbf = new Pbf(new Uint8Array(bufferRes));
	var obj = FeedMessage.read(pbf);
	console.log(obj.entity);
});

The console.log() output is [].

Here it is on JS fiddle:

https://jsfiddle.net/opb6deqL/

Am I doing something wrong or maybe the GTFS Realtime dataset I'm trying to pull data from is malformed or something? Downloading https://data.texas.gov/download/eiei-9rpf/application%2Foctet-stream gets me a 25KB file so it's clearly not empty. And given that the PB file has been downloaded 186M times it's hard to believe that it's malformed and no one has ever noticed. Most likely, I'm probably doing something wrong but idk what.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant