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

Transit networks #2921

Closed
wants to merge 1 commit into from
Closed

Transit networks #2921

wants to merge 1 commit into from

Conversation

quincylvania
Copy link
Contributor

This is an incomplete draft addressing #2864. Feedback is encouraged as we figure out how to best implement this feature.

Copy link
Member

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting the ball rolling! The comments below are about maintainability rather than ease of client use, but I know there are tradeoffs.

@@ -0,0 +1,67 @@
{
"public_transport/platform/bus|MBTA Bus Stop": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have a separate entry for each kind of feature that can be associated with the network, then there will be a lot of duplication, not just between the various entries in this file but also among each file. It would also become tedious to add support for associating a network with, say, ticket vending machines with networks after the fact.

Instead of orienting these files around presets, how about focusing on networks and indicating the applicable modes of transportation as fields on each network?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you go into more detail? Do you mean like defining "this is the network and then these are the things that can be part of this network"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. For example, most county transportation agencies would be defined by a single entry describing the network. There would be a bus property set to true, and elsewhere NSI or iD would take that to mean that the network should apply to the existing Bus Stop, Bus Station, and Bus Route presets. If the same agency operates a bus rapid transit line that’s part of the same network, with ticket vending machines along the route, then setting vending_machine to true would automatically associate the network with that preset too.

That’s the simple case, anyways. I’m sure there are edge cases that maybe we can address by specifying overrides of individual tags.

"public_transport/platform/bus|MBTA Bus Stop": {
"countryCodes": {
"us": {
"ma": true
Copy link
Member

@1ec5 1ec5 Jul 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clever way to avoid duplicates and make life easier for clients. Do you think we should change the existing brand entries to also structure countryCodes as an object? Each country code could be set to just true if it applies nationally but to an object if we want to get more granular.

Alternatively, it’d be simpler for contributors (less verbose syntax) if we stick to a flat array of codes that could be ISO 3166-2 codes. But that could be more difficult for a client to use Nominatim for, so maybe the build script could transform the flat array into this object structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into it more, I suppose using the combined codes like ad-07 in an array might be easier for most people. My developer brain wanted to keep the country and subdivision codes separate and hierarchical but it's no big deal to parse them out later.

@@ -0,0 +1,67 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What folder should interstate agencies or multi-state private carriers go into?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figure it'd be similar to the osm-community-index structure where interstate carriers terminate under the country folder, like networks/north-america/us/greyhound.json.

I suppose I already introduced a case where a local agency has a service that crosses state lines with "MBTA Commuter Rail" also reaching Rhode Island. We'll have to decide how strict to be with the structure.

@bhousel bhousel added the considering Not Actionable - still considering if this is something we want label Nov 8, 2019
@bhousel
Copy link
Member

bhousel commented Jun 2, 2020

Going to close this for now. Soon I'm going to swap out the countryCodes for location-conflation-style locationSets like we use on osm-community-index and imagery-index, which will let us define better regions for things like transit agencies.

The other restructuring stuff to allow operator or network to be the the defining tag (instead of brand) is in the back of my mind and will come eventually too.

@bhousel bhousel closed this Jun 2, 2020
@quincylvania
Copy link
Contributor Author

@bhousel Sounds good. This was pretty stale, I'd nearly forgotten about it.

@bhousel bhousel deleted the networks branch December 1, 2020 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
considering Not Actionable - still considering if this is something we want
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants