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

Add a link to the trip destination on journey's display_information #1931

Open
pbougue opened this issue Jan 16, 2017 · 8 comments
Open

Add a link to the trip destination on journey's display_information #1931

pbougue opened this issue Jan 16, 2017 · 8 comments

Comments

@pbougue
Copy link
Contributor

pbougue commented Jan 16, 2017

This would help Transportr solve: grote/Transportr#274 (comment)
And the navitia's googlegroup topic is here: https://groups.google.com/forum/#!topic/navitia/7TZQcxnaU2Q

The idea is: the route is not enough to match the destination of the vj in a lot of cases (depending on the data), and the display_information only gives the label of the last stop.
Most of it is C++ work in pb_converter.
Adding an uri of this stop or a link (and the corresponding details in response) seems to be the good/easiest work to do.
A display_information.direction_uri might be a solution too.

@grote
Copy link

grote commented Jan 16, 2017

Thanks for creating this ticket!

If at all possible, I would like to avoid having to do a second HTTP request to get the stop_area of the route direction and have this information included in the response to the departures query.

@pbougue
Copy link
Contributor Author

pbougue commented Jan 16, 2017

You're welcome :)
And what more information do you need? Uri, name, label...?

@grote
Copy link

grote commented Jan 16, 2017

Ideally, the API returns a full stop_area object for the line's direction.

It does that already, only that the stop_area is wrong if the line does not have the direction_id set, so this ticket could also be a bug and not an enhancement. Check out this screenshot from the playground from grote/Transportr#274:

screen shot 2017-01-07 at 16 34 27

The route has a direction which has a stop_area only that it is the wrong one (from the line's other direction).

@pbougue
Copy link
Contributor Author

pbougue commented Jan 16, 2017

As @stifoon said, we rely on data for route and direction and we don't build one for each stop_area that is the end of a vehicle_journey (and even doing that would not be enough some times).
So you can't safely process route's direction to know which way the vehicle is heading (and it's even more the case in GTFS format, as you only have 2 directions).
In the case you're providing, only one route is given in data, so we return always that same unique one.

So putting the complete final stop_area in display_information (probably in links part to mutualize) would do the job for you?

@grote
Copy link

grote commented Jan 16, 2017

So putting the complete final stop_area in display_information (probably in links part to mutualize) would do the job for you?

I don't know what you mean by "in links part to mutualize", but otherwise, yes.

@pbougue
Copy link
Contributor Author

pbougue commented Jan 16, 2017

The idea would be to add in display_information.links something like:

            {
                "id": "stop_area:bobito",
                "internal": true,
                "rel": "destination",
                "templated": false,
                "type": "stop_area",
            }

And at the root of the response a stop_areas table containing that "bobito" stop_area (so if we have 2 departures with the same destination, the stop_area informations are mutualized)

@ialokim
Copy link

ialokim commented Sep 4, 2020

Any news on this issue?

@pbougue
Copy link
Contributor Author

pbougue commented Dec 30, 2020

I'm not in the team working on Navitia anymore, but as far as I know, no work is planned for that.
Any contribution is welcome though (as it's not so complicated work, support would be provided quickly I guess).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants