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

Which lines run near my position #21

Closed
annikabock opened this issue Sep 4, 2018 · 13 comments
Closed

Which lines run near my position #21

annikabock opened this issue Sep 4, 2018 · 13 comments
Labels
enhancement New feature or request Feature Request

Comments

@annikabock
Copy link

As passenger, I want to know which lines are passing by my current place.
Die Idee war so ein bißchen, dass man direkt nach dem Öffnen der App sieht, welche Linien grundsätzlich am Standort vorbeiführen.

@annikabock
Copy link
Author

Check the index Api for routes and stops:
http://trufiapp.westeurope.cloudapp.azure.com:8080/otp/routers/default/index/stops

@annikabock
Copy link
Author

@natalyablanco natalyablanco self-assigned this Sep 6, 2018
@annikabock
Copy link
Author

@natalyablanco does this function help?
This /routers/{routerId}/index/stops/{stopId}/routes

@natalyablanco
Copy link
Contributor

yes! I saw that on Friday. I wanna integrate that endpoint today. The response is [{"id":"1:108","shortName":"104","longName":"E-Se (Taxi trufi)","mode":"BUS","color":"00FF66","agencyName":"Sindicato 1ro de mayo"},{"id":"1:107","shortName":"104","longName":"So-E (Taxi trufi)","mode":"BUS","color":"00FF66","agencyName":"Sindicato 1ro de mayo"}]

I assume we want to show the shortName, right?

@aemkei
Copy link

aemkei commented Sep 10, 2018

We discussed this feature before and decided to skip it in the mobile app because the added value for the user might not be high enough compared to the data volume and a more complicated interface.

@aemkei
Copy link

aemkei commented Sep 10, 2018

Also a hint: the link above refers to an older API. You might want to use 1.0 instead of 0.15:

http://dev.opentripplanner.org/apidoc/1.0.0/

@natalyablanco
Copy link
Contributor

Thanks for the link!
I agree, it seems to be too much to get such a simple information. Maybe with a cleaver design we could add this information later on. I'll keep the branch just in case. :)

@RaimundWege
Copy link
Contributor

I thought about a map tiles overlay which shows the routes when no plan is loaded.

@aemkei
Copy link

aemkei commented Sep 10, 2018

I also have a GeoJSON and TopJSON file with all the lines:

trufi-lines.zip

You can drag this into http://geojson.io/ to see all the lines:

image

@RaimundWege RaimundWege added the enhancement New feature or request label Feb 15, 2019
@mdoelker
Copy link
Contributor

Looks like /index/stops in combination with /index/routes will get us all the data that is needed. We could also generate a more condensed version daily and have the app download it alongside the search data.

@mdoelker
Copy link
Contributor

mdoelker commented Feb 16, 2019

Hmm looked into it a bit more and its not easy to relate them with these endpoints. Having looked into graphql a bit lately I was able to extract the information from the graphql endpoint though pretty easily.

I have also added a script that would convert the data to GeoJSON. (Commit: https://gitlab.com/truffi/data/commit/4578dd1a60b3b0d82e6d8daba949548ea2cdc57c#350e8112e6566b11242ec308a403ff2cb16e747c)

The GraphQL query I used is:

  {
    routes {
      shortName,
      longName,
      color,
      agency {
        name
      },
      stops {
        lat, lon
      }
    }
  }

Details how to request the data in https://gitlab.com/truffi/data/blob/master/src/export-lines-geojson.js

This gave me a slightly updated map. I am excited to see it when we have the OSM routes as well :D
image

I suggest we consume the endpoint from within the app and cache the result a while.

More info on how to get types & fields: https://graphql.org/learn/introspection/

@mdoelker
Copy link
Contributor

We have to query the lines in a way that returns them only for the area we look at though if we keep adding new cities. Will check if the graphql endpoint makes that possible.

@ValorNaram
Copy link
Member

Closing this due to topic inactivity.

Internal future strategy: Attracting more women to work on technical tasks like @annikabock or @natalyablanco . Check reactivation of gender diversity.

@ValorNaram ValorNaram closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature Request
Projects
None yet
Development

No branches or pull requests

7 participants