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 city name to stop #108

Open
AltNico opened this issue Dec 17, 2017 · 18 comments
Open

Add city name to stop #108

AltNico opened this issue Dec 17, 2017 · 18 comments

Comments

@AltNico
Copy link
Collaborator

AltNico commented Dec 17, 2017

When generating national GTFS feeds it is important to have the possibility to add the city name to a stop because it is very likely that one stop name exists in various cities.

Example: Managua, Mercado Mayoreo (Bus stop Mercado Mayoreo in Managua, Nicaragua)

@grote
Copy link
Owner

grote commented Dec 17, 2017

At least Navitia should add the city automatically to stops based on information from OSM. If you add this to stop names, you would see the city twice in Transportr.

@AltNico
Copy link
Collaborator Author

AltNico commented Dec 17, 2017

In Transportr Nicaragua city names are missing from the stop names, so for example I only see 'Hospital'. Do I need to configure anything anywhere in order to automatically add that name?

@grote
Copy link
Owner

grote commented Dec 17, 2017

You need to talk to the navitia people about this. AFAIK it needs administrative boundaries with admin_level = 8 (cities) to build streets and addresses. Also, make sure that you included OSM data in your server for this region.

@prhod
Copy link
Collaborator

prhod commented Dec 18, 2017

All the GTFS i encountered doesn't specify city names in stop names. I don't think adding this information is a god idea if it's a workaround specific to navitia.
Just in case, there is also the difficulty of specifying the city level to take into account, that can be different from a country from an other, and with exceptions for some cities (example of London in UK).

@nlehuby
Copy link
Collaborator

nlehuby commented Dec 18, 2017

I agree : I don't think adding city to stop name is a good GTFS practice.
In my opinion, this could be handled in a custom creator if really needed

@ialokim
Copy link
Contributor

ialokim commented Jan 5, 2018

AFAIK it needs administrative boundaries with admin_level = 8 (cities) to build streets and addresses.

@prhod @nlehuby Is is possible to automatically add the city name to stops?

@prhod
Copy link
Collaborator

prhod commented Jan 6, 2018

@ialokim I'm not sure to understand your question. Are you asking this in navitia or in osm2gtfs ?
In Navitia, the city construction is automatic but has to be enhanced. In osm2gtfs, I don't think it's a good idea to add the city name to stops.

@ialokim
Copy link
Contributor

ialokim commented Jan 6, 2018

I was asking about navitia, sorry, my fault.

In Navitia, the city construction is automatic

So can this city name automatically be appended to stop names? Or can it be accessed within the API when requesting stop details?

@prhod
Copy link
Collaborator

prhod commented Jan 6, 2018

To keep it simple, Navitia loads cities from OSM with the boundaries. Each point (stop, Point of Interest or address) is associated with administrative_regions. The labelof the object gives a preformated text with the stop name and the city name. The raw stop name and the properties of the adminstrative_regions can also be accessed.
There could be several in case of stop areas grouping stop_points of different cities, for example : https://canaltp.github.io/navitia-playground/play.html?request=https%3A%2F%2Fapi.navitia.io%2Fv1%2Fcoverage%2Ffr-idf%2Fstop_areas%2Fstop_area%3AOIF%3ASA%3A59%3A3681487
Tell me if you want any more details ;-)

@ialokim
Copy link
Contributor

ialokim commented Jan 6, 2018

Okay perfect, thanks a lot for this explanation! So definitly there's no need to add city names to stops inside osm2gtfs.

Testing it on our own navitia instance, it seems the label is always equal to the name. We've included OSM data for Nicaragua. Do we need some extra settings and would it work on navitia.io anyway or is it a problem with the OSM data?

Looking at pte's source code, I'm fearing this label field isn't supported there, so probably we should open an issue or PR over there.

@grote
Copy link
Owner

grote commented Jan 7, 2018

PTE should already take the city of the first administrative_region and add it to the place variable. The label of the object with the preformated text is not what you want in PTE.

@ialokim
Copy link
Contributor

ialokim commented Jan 7, 2018

PTE should already take the city of the first administrative_region and add it to the place variable. The label of the object with the preformated text is not what you want in PTE.

Looking at the code, it seems it only does in some cases (hardcoded, in German language), see here. That would definitely not work for Nicaragua.

@grote
Copy link
Owner

grote commented Jan 7, 2018

@ialokim
Copy link
Contributor

ialokim commented Jan 7, 2018

Okay, my fault, the place variable is public, but it isn't used by the uniqueShortName() function which is used inside Transportr. It seems that it could be fixed inside Transportr then by not using the uniqueShortName but combining stop and city name here.

@grote
Copy link
Owner

grote commented Jan 7, 2018 via email

@ialokim
Copy link
Contributor

ialokim commented Jan 7, 2018

It is used by Transportr for location auto-completion.

Okay, perfect.

I suggest you inspect the API results of your instance directly to see if administrative regions exist there.

We already know that they are not, but I wanted to be sure they could be shown by Transportr. Thanks a lot for your explanations!

@ialokim
Copy link
Contributor

ialokim commented Feb 12, 2018

I think this could be closed.

@AltNico
Copy link
Collaborator Author

AltNico commented Feb 12, 2018 via email

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

5 participants