-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specs gtfs2ntfs: reading shapes & frequencies #424
Conversation
A new trip is created, departing from the first stop every `headway_secs` seconds within the time period between `start_time` and `end_time`. Stop times of the referenced trip are used to calculate the time interval between two stop departures. | ||
The departure time at the first stop of the last trip should not be later than the `end_time` value. | ||
|
||
Th identifier for each new trip is generated using the following pattern: \<trip_id>:<auto-incrimented integer\> and maintains the rest of the attributes of the sample trip. That is, all new trips are assigned to the same route as the route of the sample trip, have the same service_id, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Th identifier for each new trip is generated using the following pattern: \<trip_id>:<auto-incrimented integer\> and maintains the rest of the attributes of the sample trip. That is, all new trips are assigned to the same route as the route of the sample trip, have the same service_id, etc. | |
The identifier for each new trip is generated using the following pattern: \<trip_id>:<auto-incremented integer\> and maintains the rest of the attributes of the sample trip. That is, all new trips are assigned to the same route as the route of the sample trip, have the same service_id, etc. |
A new trip is created, departing from the first stop every `headway_secs` seconds within the time period between `start_time` and `end_time`. Stop times of the referenced trip are used to calculate the time interval between two stop departures. | ||
The departure time at the first stop of the last trip should not be later than the `end_time` value. | ||
|
||
Th identifier for each new trip is generated using the following pattern: \<trip_id>:<auto-incrimented integer\> and maintains the rest of the attributes of the sample trip. That is, all new trips are assigned to the same route as the route of the sample trip, have the same service_id, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, the frequencies
are using a virtual trip
that need to be destroyed once all frequencies have been transformed into stop_times
. Maybe this can be mentioned in the specification too?
| geometries.txt | geometry__id | ID | shapes.txt | shape_id | All slashes `/` are removed | | ||
| geometries.txt | geometry__wkt | Required | shapes.txt | shape_pt_lat, shape_pt_lon, shape_pt_sequence | A WKT LINESTRING geometry is created from the 3 input fields. | | ||
|
||
### Reading frequencies.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I did the documentation, I had these 3 special cases:
src/gtfs/read.rs:954
WARN/IGNORE [frequency for trip <frequency.trip_id> has same start and end time] if thefrequency
start time and end time are the samesrc/gtfs/read.rs:964
WARN/IGNORE [frequency mapped to an unexisting trip <frequency.trip_id>] if thefrequency
refers to avehicle_journey
which doesn't existsrc/gtfs/read.rs:975
WARN/IGNORE [frequency mapped to trip <frequency.trip_id> with no stop_times] if thevehicle_journey
relative to thefrequency
doesn't have anystop_time
They are very technical but I think they should be documented one way or another (except maybe the second one which might be evident enough).
Frequencies are transformed into explicit passing times by creating new trips that operate on regular times within the specified period. For each line of the GTFS frequencies.txt file, the referenced trip and its stop_times are used as a sample to create the new trips whose stop_times are calculated based on the given headway. | ||
|
||
A new trip is created, departing from the first stop every `headway_secs` seconds within the time period between `start_time` and `end_time`. Stop times of the referenced trip are used to calculate the time interval between two stop departures. | ||
The departure time at the first stop of the last trip should not be later than the `end_time` value. In case both values for `start_time` and `end_time` are equal, the frequency is ignored (no new trip is created). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equals? (not sure)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding the ignored case when endtime is inferior to the starttime ?
@@ -187,7 +189,7 @@ immediately with an error. | |||
| trips.txt | route_id | Required | trips.txt | route_id | cf. NTFS `route_id` definition above to specify the proper reference. | | |||
| trips.txt | service_id | Required | trips.txt | service_id | | | |||
| trips.txt | trip_id | Required | trips.txt | trip_id | | | |||
| trips.txt | trip_headsign | Optional | trips.txt | | `trip_short_name`, of if empty `trip_headsign` | | |||
| trips.txt | trip_headsign | Optional | trips.txt | | `trip_short_name`, or if empty `trip_headsign` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since NTFS 0.10 there are now 2 fields "trip_headsign" and "trip_short_name".
It's not yet implemented in TransitModel, but I think it will be soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok to do this later to avoid opening toi many subjects at once
|
||
| NTFS file | NTFS field | Constraint | GTFS file | GTFS field | Note | | ||
| --- | --- | --- | --- | --- | --- | | ||
| geometries.txt | geometry__id | ID | shapes.txt | shape_id | All slashes `/` are removed | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geometry_id and geometry_wkt (remove one underscore)
Frequencies are transformed into explicit passing times by creating new trips that operate on regular times within the specified period. For each line of the GTFS frequencies.txt file, the referenced trip and its stop_times are used as a sample to create the new trips whose stop_times are calculated based on the given headway. | ||
|
||
A new trip is created, departing from the first stop every `headway_secs` seconds within the time period between `start_time` and `end_time`. Stop times of the referenced trip are used to calculate the time interval between two stop departures. | ||
The departure time at the first stop of the last trip should not be later than the `end_time` value. In case both values for `start_time` and `end_time` are equal, the frequency is ignored (no new trip is created). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding the ignored case when endtime is inferior to the starttime ?
A new trip is created, departing from the first stop every `headway_secs` seconds within the time period between `start_time` and `end_time`. Stop times of the referenced trip are used to calculate the time interval between two stop departures. | ||
The departure time at the first stop of the last trip should not be later than the `end_time` value. In case both values for `start_time` and `end_time` are equal, the frequency is ignored (no new trip is created). | ||
|
||
Note that the referenced trip (and its stop_times) is only used as a sample and is not generated by the reader in the end. In case the referenced trip ans/or its associated stop_times do not exist, the frequency is ignored (no new trip is created). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced by the use of generated by the reader
. What about something like and is deleted is the resulting data
?
- Typo in
ans/or
No description provided.