grote / Transportr

Free Public Transport Assistant without Ads or Tracking
https://transportr.app
GNU General Public License v3.0
1.04k stars 188 forks source link

Location search for Helsinki region (HSL) does not work #476

Closed aperezdc closed 6 years ago

aperezdc commented 6 years ago

Steps to reproduce

  1. Install Transportr 2.0.0 using F-Droid (I haven't checked the Google Play version, I don't have Google Apps/Services installed).
  2. Open the application, choose Finland→Helsinki (HSL) as region.
  3. Tap the “Search here” entry and type some location, for example “Viiskulma” (it's an intersection), “Rautatientori” (a square) or “Keskuskatu” (a street).

Expected outcome

The typed location can be chosen to navigate to.

Actual outcome

Nothing happens, there are no search results.

Additional information

aperezdc commented 6 years ago

Let me know if there is some way in which I could help debugging this, I'll be happy to help :wink:

grote commented 6 years ago

We should probably remove HSL, since they have shut down their API: https://github.com/schildbach/public-transport-enabler/issues/166

A pull request for removing it would be welcome!

If you want Finland supported, I suggest to add a Navitia-based provider or implement the new HSL API.

aperezdc commented 6 years ago

@grote Thanks for the info, that is a bit sad... I might be able to hack something during the weekends, though—but bear with me, because my experience writing Android applications is close to zero.

If I understand correctly, the GTFS data is available. After reading the contribution guide I have found that:

I would like to know what would be the best approach to try to contribute updated support for HSL, and I have a few questions:

Sorry for the bunch of questions, but I would really love to be able to use Transportr in Helsinki, and would love to help... unfortunately both Android development and mapping/GIS are two areas I know little about and some guidance would really help me get started. Thanks!

grote commented 6 years ago

my experience writing Android applications is close to zero.

This is all pure Java. No Android knowledge required.

Is the above enough to submit a Navitia based provider?

Yes, looks good.

Would it be possible to use a Navitia based provider for the initial bringup, and then improve it with the additional information provided by the HSL API? For example, I see that the new HSL API has GTFS-Realtime feed for live traffic updates.

That will be tricky, because they most likely use different ID for stations, busses, etc. You will probably end up doing a dedicated HslProvider.

Also, HSL provides their own routing service API. If I understand correctly, GTFS would only provide the timetables and Transportr does the routing itself with the data from GTFS.

Transportr doesn't do any routing on its own unfortunately. This is why we need Navita between GTFS and Transportr. They have a routing engine and provide their own API.

aperezdc commented 6 years ago

Thanks for all the answers! I think first I'll try replacing the current HSL provider with the Navitia one, to get a feel at contributing, learn along the way, and to have something that at least works. Then, if my free time allows for it, I'll look at implementing a provider with the new HSL API.

grote commented 6 years ago

Awesome! Sounds like a good plan. I would also appreciate if you could update the links to the code examples on the website: https://github.com/grote/Transportr-website/blob/master/content/contribute.md#using-gtfs You will probably need to look at more recent ones anyway. The public-transport-enabler side hasn't changed, but at the Transportr side it has.

grote commented 6 years ago

Thanks @aperezdc this works again now with Navitia API!