HellblaZer
HellblaZer

Reputation: 1

Make Calendar File when Time Duration is in Days

I am working on Jakarta Non-GTFS source and I am facing a weird issue for ferry transportation. The departure time is 6:00 AM on 22-feb-2016 and arrival time is 8:00 PM on 27-feb-2016. Any suggestions on how do we convert this to GTFS format. I have converted the raw data to GTFS format for stops, routes, trips but I am not sure of how to do that for stop_times, calendar and calendar_dates files. So, in stop_times file, we need to put the arrival time and the departure time (assuming for the same day), but how do we do that in this case?

Upvotes: 0

Views: 117

Answers (1)

abeboparebop
abeboparebop

Reputation: 7745

This is a pretty unusual use case for GTFS, but it can be done, at least in principle.

First, you'd have a service entry in either calendar or calendar_dates that indicates that the ferry service is active on 2016-02-22. (If it's a trip that recurs on a daily or weekly basis, then calendar is appropriate. For other cases, including one-off trips and trips that recur less frequently than weekly, calendar_dates is appropriate.)

Then, you'd create an entry in trips for this specific trip (connected to the entry in either calendar or calendar_dates by the service ID).

Finally, in stop_times, you would have two entries for this trip: one for the departure, at 06:00:00, and then another for entry for the arrival 5 days later, at 140:00:00.

The fundamental principle here is that hours >= 24 are allowed (and indeed required) for service that extends beyond one calendar day. A much more common usage for this pattern are trips that begin at e.g. 25:00:00 and correspond to late-night service which is thought of as a continuation of the previous day's service. But in principal the same pattern applies for trips that simply last multiple days.

Upvotes: 4

Related Questions