Comments (5)
To sum up, we have an agreement on the following:
- in
osm_connector
, handleroute_id
duplicates by warning the user and appending something at the end - option: make it nicer by increasing some number in the appendix instead of foolishly appending
- option: add a standard way to use
osm id
instead ofref
to createroute_id
from osm2gtfs.
IMHO, using ref
as a route_id is easier to manipulate later the GTFS. The problem arise when several identical ref
exists as @nlehuby said.
The different options I could came up with are :
- suffixing the
ref
when several such lines exists : consistency of route_id cannot be guaranteed or at the coast of a tricky sort - using osm ID only for conflicting routes : same consistency problem when one of the route disappeared
- have a parameter in constructor to specify the use of
ref
orrelation_id
accordingly to local constraints - deal with this problem at each constructor's choice
The 3rd option has my preference, and the 4th can be a fall back if necessary.
Hope this helps a little !
from osm2gtfs.
I think we do good to separate the conversation into:
- Standard behaviour - what does osm2gtfs when it finds a duplicate for generating the GTFS
route_id
- Fallback solution(s) - how can local particularities being realized and made possible.
As the standard behaviour I like what you point our @nlehuby and group on the fly if they seem to be the same. This would be a much better behaviour. But still there are a lot of "unless if". And how we address them?
a. We append automatically the field that caused the difference (the agency, the type of transport, etc.) - this might dangerous and we don't have always a suitable value
b. We drop the second occurrence - as it is currently, which we didn't like.
In any case if there is any duplicate we probably want to keep the warning in place, so that people are informed to use one (of the) fallback solutions.
I'm still not so happy about neither a. nor b. Do you have any other better idea?
For fallbacks, which need manual interaction either with code or the configuration file, we have the two options (3 and 4 from @prhod) and we could implement both:
- Allow a user in a config file to specify the
ref
orrelation_id
field to be used for theroute_id
. - Let the custom creators deal with any other particularity.
Personally, I thing we are ok, with giving this flexibility only to the creators (fallback option 4). This is because I dislike a bit to encourage anybody using the OSM relation_id
for the GTFS route_id
, only if people know really what they are doing - and then they can make their own creator 😄
from osm2gtfs.
It is not the option that seems to win the vote but I prefer my last suggestion to use the relation id
as route_id
:
- we already use
osm id
for the stops so it enhances the consistency - it is already unique so we don't have to worry about it
- I find it helpful to debug
- it's an elegant way to keep the relationship with OSM in the GTFS
So if I had to choose between @prhod options, I obviously choose the 3rd one.
For the standard behaviour, I think we need to append the osm line anyhow, because grouping is uncertain and discarding is too violent.
the first option of @prhod could actually do the trick: If you don't override with your own creator of with this hypothetical conf to say that you will use osm_id
as route_id
, the fist one will be "18", the next one could be "18_1", the next one could be "18_1_1".
That's not pretty, but that's simple enough and would work.
from osm2gtfs.
So, for the standard behaviour we can choose between the uncertain, the violent or the ugly? 😄 i follow you, @nlehuby to give preference to the ugly. Just wondering whether we want it to be a bit nicer:
- append an increasing number: x_n. For example, 18_2, 18_3.
- Give a warning to the user
For the fallback, the handling in creators (option 4) is there already by nature. And the question is whether we want to add a configuration option to exchange the ref
for the relation's osm_id
. I don't like it so much to make this a standard feature, but if you two think this is a good idea, then let's do it.
from osm2gtfs.
Related Issues (20)
- Add city name to stop HOT 18
- Add city information to Line/Itinieray names HOT 3
- Support multiple values for the same OSM tag HOT 1
- Extend handling of `start_date`/`end_date` to support schedule as a source HOT 5
- Support all possible values of service periods and exceptions HOT 6
- Add alternative schedule source format with frequencies HOT 2
- Core tests HOT 2
- Implement included_lines and excluded_lines in standard trip creator or OsmConnector HOT 7
- Enabling a fast simple creator without timetable HOT 3
- Search for alternative stop name in the stop_area relation if exists before searching for other nodes close to the stop
- Default implementation for TripCreator with frequency support HOT 5
- Cache based on config file, not selector to support different agencies per city HOT 4
- Support hail_and_ride / GTFS Flex HOT 16
- [question] Potential stop is invalid and has been ignored / nodes of a platform way HOT 3
- Incomplete shapes because of roundabout HOT 1
- Issues loading bus stops HOT 2
- problem with package installation
- problem with package installation HOT 1
- "This feed has no effective service dates!" Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osm2gtfs.