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

understanding the converter #1

Open
bonfirefan opened this issue Nov 21, 2017 · 2 comments
Open

understanding the converter #1

bonfirefan opened this issue Nov 21, 2017 · 2 comments

Comments

@bonfirefan
Copy link

Hello - thank you for creating this gtfs converter - I'm surprised this does not get more use. I've used gtfs2graphs to convert the gtfs feed for a specific agency into network graphs for the most part, but wanted to understand the project a bit better. There also appear to be some possibly deprecated code that refer to conf files that do not exist (in gml_extract_types.py).

To clarify -

  • get_feeds.py : connects to transitfeeds and downloads the gtfs files for all available agencies, once we have inputted our transitapi keys in get_feeds_conf_.yaml
  • gtfs2graphs.py : converts a gtfs zip file to our selected graph output
  • gml_extract_types.py : this does not work due to the conf file mentioned
  • gmlgtf2slp.py : converts gml files to lp files
  • run4allfeeds.sh : appears to be bash script to run gtfs2graphs.py for all feeds available

While the gtf2graphs.py appears to have worked for the feed I am interested in working with, it appears that the graphs output with non-identifiable ID's. It also appears that there are some config files that are set up specifically for Germany - is this something we will have to set regionally?

Thanks again in advance.

@daajoe
Copy link
Owner

daajoe commented Nov 22, 2017

Hi,
thanks!
Yes, you are absolutely right the repo misses a documentation.
I wrote one for a solver competition PACE 2016 transit feeds. It also contains a brief description about the converter parts.

  • get_feeds.py : yes
  • gtfs2graphs.py : yes. atm only dimacs/lp/gr/gml. note that gr and dimacs are integer based formats.
  • gml_extract_types.py ... is deprecated (it was only used to split already available gml graphs with available agency/route type info)
  • gmlgtf2slp.py : yes.
  • run4allfeeds.sh : yes, but does it only for the gr format

Issue (non-identifiable IDs):

  • this was a decision, because of a legal issue/unclarity. many transit feed providers don't use CC. making the data anonymous should avoid this for solver competitions.
  • the option --print_symtab or --print_labels should allow you to output also the labels/symbol table for the integer based formats
  • if you want to modify the output in the gml file graph_output.py:write_gml should have all the necessary data also for identifiable IDs

Configs:
The config file gtfs_into_conf.yml contains only info for the Berlin Metro region. It was only used to have a trivial mapping to cities.

The proper way to do a geo-location would probably be to take the lat/long data stored in the stops and run a geo-localization. The networkx graphs should already have the lat/long data (gtfs2graphs.py:L97). Google's geo-location is just a RESTful call, but the free plan is limited afaik to 1k calls each day (150k after registration).

@bonfirefan
Copy link
Author

Thank you, the documentation is extremely helpful! I'll be continuing to work on this and will ask if I have further questions.

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

2 participants