Coder Social home page Coder Social logo

Comments (15)

brendannee avatar brendannee commented on August 19, 2024

Which agency's GTFS are you using?

from node-gtfs.

 avatar commented on August 19, 2024

It's occurred with city-of-seattle and kolumbus. I'll try out a couple of other agencies.

Update: I tried ac-transit and bay-area-rapid-transit, but to no avail.

from node-gtfs.

lpolaright avatar lpolaright commented on August 19, 2024

True, I can confirm this problem.
It seems to be a problem with the incorrect use of async.series()
specifically in the function "getShapesByRoute".

Where the callback receives an array of results from async.series's functions.
Which are 'shape_ids' and 'shapes'.
While in fact the callback should be called with shapes in the end.

from node-gtfs.

 avatar commented on August 19, 2024

@lpolaright cool! thanks for looking into this. so is this function working on your forked version?

from node-gtfs.

lpolaright avatar lpolaright commented on August 19, 2024

@adampitchie, I haven't finished working on my fork. So unfortunately it's still not working on my version. However, There's a fork by @AnthonyTTaylor that works:

Here is specifically the commit that made it work:
https://github.com/AnthonyTTaylor/node-gtfs/commit/68d19e5bc1688d2a097f20a736740a6cfd4a2102
Specifically line 661 (probably shouldn't take his forked version, he changed the name of the function as well).

from node-gtfs.

AnthonyTTaylor avatar AnthonyTTaylor commented on August 19, 2024

@lpolaright Yeah, be careful when using mine, things were heavily changed all over the place, to try and make things work. Which still wasn't working near the end do everything is being rewritten.

from node-gtfs.

AnthonyTTaylor avatar AnthonyTTaylor commented on August 19, 2024

Also, while im here, there is an error with arrival times returning nothing when there should be active lines running, unsure if thats the branch I was working on or if its the master branch, but a lot of Canadian cities return nothing during active times.

from node-gtfs.

lpolaright avatar lpolaright commented on August 19, 2024

@adampitchie made a pull request to make it work again.
@AnthonyTTaylor lets open a new issue about the arrival times returning nothing. Can you make a more detailed issue report so we could try and fix it? such as what function you are using

from node-gtfs.

brendannee avatar brendannee commented on August 19, 2024

Thanks for the pull request @adampitchie - I accepted it and released 0.4.1 https://www.npmjs.com/package/gtfs

It does seem to solve the getShapesByRoute issue, please let me know if anyone still sees this issue.

@AnthonyTTaylor please open a new issue for the arrival times issue - let me know some specific GTFS files that have the issue you are seeing and I'll check it out.

from node-gtfs.

 avatar commented on August 19, 2024

@brendannee it was @lpolaright that made the pull request. thanks for figuring it out!

from node-gtfs.

brendannee avatar brendannee commented on August 19, 2024

Sorry - Thanks to @lpolaright for the pull request and @adampitchie for reporting this issue!

from node-gtfs.

 avatar commented on August 19, 2024

So I'm still getting an empty array returned, even with the rewritten functions. All the other functions are working just fine.

I've tried this on BART and bloomington-transit data sets. @brendannee how did you verify that it solved the issue? Am I just doing something wrong?

Currently I'm running a MongoDB instance on OS X, and querying the server programmatically with the provided functions from WebStorm and printing them to console.

Help!

from node-gtfs.

lpolaright avatar lpolaright commented on August 19, 2024

@adampitchie hey man, after the previous fix - it worked for me.
I see you've made a pull request for removing parseInt when we query for the info.
Weird that it didn't work for you, but it did for me.
Could be a difference between our transit data sets?

from node-gtfs.

 avatar commented on August 19, 2024

@lpolaright It very well might be, what data sets are you using?

from node-gtfs.

brendannee avatar brendannee commented on August 19, 2024

Thanks for the pull request - I just pushed version 0.4.2 with this change: https://www.npmjs.com/package/gtfs

I think this wasn't an issue for anyone whose shape_id was an integer - but if your dataset used non-integers it would break.

Closing this issue - but please let me know if this does not solve it for you.

from node-gtfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.