Closed anarcat closed 6 years ago
What exactly is this issue about?
Hmm... sorry if that wasn't clear: i wish to see if it's possible to have transportr routing and showing transit maps for the New York City area.
It seems the data is freely (as in beer) accessible: http://web.mta.info/developers/
However, you need some API key and agree to their terms of service:
http://web.mta.info/developers/download.html
Not sure that's going to work out...
Routing and Transit Maps are two different issues. New York should be supported by Navitia. I think you know now how to add that yourself ;)
The maps are a whole different issue and require proper infrastructure which isn't there, yet. But I plan on having this feature eventually.
I guess I mean routing then.
The terms of use are basically, you can't:
There is no specific License required otherwise, unless the MTA's intellectual property (logos, symbols, agency names) are used.
There's also a mailing list. https://groups.google.com/forum/#!forum/mtadeveloperresources
I am not sure what Navitia is, actually - is this the wrong place to ask for new cities in Transportr?
You were involved in adding support for Quebec. That happened with Navitia. The process is described here: https://transportr.grobox.de/#add_region But you can also look into how Quebec was done. It is exactly the same for New York.
Oh okay, I see. Well, I just tested an APK - I didn't do much more. I opened an issue in the enabler queue to dump the ideas there instead: https://github.com/schildbach/public-transport-enabler/issues/84
Previous comments about the MTA terms of service and everything are rendered obsolete by Navitia's support, obviously. :)
Thanks for the quick feedback!
Also, I have to say that, even though I have some experience with Java, looking at those pull requests as a basis for documentation on how to add support for new cities isn't really inviting. It's not clear from the get-go how the code works and what varies according to the city or not.
Having specific documentation on how to add cities would be an improvement. For example, a template that could be filled automatically could be provided...
You need to understand somewhat what is going on in the code. The changes are so minimal and small that a template would not help and only invite people that have no clue and can't even compile their code to submit non-working PRs.
Check out Ontario here:
That is really not a lot of code and usually doesn't even change from region to region. Just change the network and region ID and adapt the test to the local stations/streets. If there need to be any differences, you only find out when trying it for yourself. Nobody knows that beforehand.
If you want to try, just clone Transportr and drop your file here: https://github.com/grote/Transportr/tree/master/src/de/schildbach/pte This way you can test with the app already without touching the public transport enabler first.
So there, you got me already: I don't have an Android development environment here. Last time I tried, the Android SDK filled my disk with 6GB+ of proprietary garbage. I will eventually try my luck again with the libre rebuilds of the Android SDK, but I can't compile stuff right now. I appreciate that the Transportr README has pointers on how to set that up, but I'm not there yet.
Furthermore, I know about the famous Ontario PR. As much as I love Ontario, it doesn't answer the questions people have here when they need to implement new regions. Which part varies with the region? What is constant across region? The code itself doesn't say. There are no comments in the code explaining what bit does what.
Code is not documentation (which connects to https://github.com/schildbach/public-transport-enabler/issues/51), and a simple README (https://github.com/schildbach/public-transport-enabler/pull/73/files) is not sufficient documentation either, especially since that README is just pointing to the source as documentation again. At the very least, the Transportr README could point to the public-transport-enabler README...
Now, I understand that you feel comfortable browsing through the source as documentation, and that may be fine! But if you want more people to get involved in the project, a little more hand-holding would be immensely appreciated.
But maybe that goes outside of this specific issue, and I should open a separate one?
I wanted to add Montreal, Quebec, but @anarcat nails it why I abandoned after spending about an hour trying to figure these things out.
I'd be happy to take an existing provider and annotate it heavily with comments if that helps you guys. However, @chimo was able to do it without just fine and you will need a proper Android dev setup to test the app.
A more detailed example would certainly be useful. And I don't know who @chimo is, but ... good for him! :)
That is the one who was so nice to do Quebec support for you. Let me know once you are able to build the app yourself.
Support for New York has been added in a5123191f8b5a323b708949a87b275483d1ac1c3 and is already available in Transportr 2 beta 2.
New York, New Yoooooork! We want to be a paart of it!