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.
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
. ๐
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.
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
:
- https://wiki.openstreetmap.org/wiki/Key:duration
- https://wiki.openstreetmap.org/wiki/Tag:route%3Dbus
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.
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 ?
I propose to do the following (within #96):
- Give the
Itinerary
the whole set of tags from OSM'sroute
, so these can be used in the creators. - Make
duration
a standard, but optional attribute toItinerary
- Alter
trips_creator_accra
to use thetravel_time
tag fromItinerary.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.