OneBusAway / onebusaway-gtfs-modules

A Java-based library for reading, writing, and transforming public transit data in the GTFS format, including database support.
Other
129 stars 106 forks source link

Modify Stop's Id #68

Closed russellhoff closed 8 years ago

russellhoff commented 8 years ago

Would it be possible to modify Stop object's identifier from AgencyAndId to use it as a simple String (so that it's only used the Stop identifier)?

OneBusAway Stops' Ids are generated in the following way:

agencyId_stopId

My intention is to simply let it be that way:

stopId

Would it be possible? Would it be possible modifying the source code?

barbeau commented 8 years ago

It's certainly possible, but wouldn't likely be modified in this library due to the dependency on the agencyId_stopId format in the rest of the OBA projects. Many OBA deployments include multiple agencies, so the combination of agencyId and stopId forms the unique identifier.

You're obviously welcome to fork the project yourself and make these changes, or just make the assumption in code at the agencyId_ prefix can be removed to give you the stopId.

You also might want to check out some other GTFS module implementations out there, such as Conveyal's gtfs-lib.