grote/osm2gtfs

Unify travel_time and duration

jamescr opened this issue ยท 16 comments

What is the difference between travel_time and duration attributes of Route object ?

(Sorry for the delayed question related with PR #66.)

Here is my guess

  • travel_time is read from an OSM tag whereas duration is set from another source.
  • travel_time is an number of minutes whereas duration is a timedelta.

But beside that, I think they both have the same purpose : set a stop_time for the last stop of the trip.

grote commented

both have the same purpose : set a stop_time for the last stop of the trip.

Maybe that's a reason to unify both properties into one?

I know you don't care how data is structure within OSM, but travel_time is more often used in combination with public_transport:version than duration. ๐Ÿ˜‰

grote commented

Wohoo nice new photo @jamescr! ๐Ÿ˜Ž

I'd be fine consolidating things to travel_time. We would just need to harmonize the data type across the creators.

Wohoo nice new photo @jamescr! ๐Ÿ˜Ž

Thanks

Yes, indeed very nice photo, @jamescr! You look a bit different, than the last time I saw you :)

The OpenStreetMap terminology clearly seems to prefer duration:

Not even one mention of travel_time in the wiki.

Yes, indeed very nice photo, @jamescr! You look a bit different, than the last time I saw you :)

Thanks, I'm getting old ;-)

The OpenStreetMap terminology clearly seems to prefer duration:

I did wrong a search on the wiki here and there.

Thanks for the correction, is really nice to have you back collaborating.

Working on the data structre (#30) I see that travel_time has been introduced by @nlehuby. Are you using this for tags on the OSM data for Accra? Or can this be changed easily to duration, according to the specs of OpenStreetMap?

There is travel_time on one wiki page. However, this seems to be wrong, as those aren't part of any approved proposal. I asked for verification on the respective mailing list.

Accra OSM mappers use the travel_time tag for the time (in min) to travel from the first to the last stop. See https://wiki.openstreetmap.org/wiki/AccraMobile3#Tro_tro_lines

The duration is not part either of an approved proposal...

Do you want to create a proposal for that purpose ?

Isn't the tag duration already official?

I propose to do the following (within #96):

  • Give the Itinerary the whole set of tags from OSM's route, so these can be used in the creators.
  • Make duration a standard, but optional attribute to Itinerary
  • Alter trips_creator_accra to use the travel_time tag from Itinerary.tags

This would extend the script to be more powerful, because all tags can potentially used in the creators; it also allows Accra to continue working with their current data; and it encourages use of duration (community's consensus).

It is implemented in this commit. Please check, if this is ok for you all. Thanks!

This is a good idea. I think you could apply the same logic to the Line object and keep all tags.

Applied to PR #96. This also is related to #13.

Resolved with accepted PR #99