NEWS.md

gtfstools v2.0.0

Breaking changes

Feature deprecation

New features

Bug fixes

Notes

| function | n times faster on poa | n times faster on spo | |---|---|---| | as_dt_gtfs() | 0.3 | 0.7 | | convert_sf_to_shapes() | 11 | 65 | | convert_shapes_to_sf() | 0.1 | 0.4 | | convert_stops_to_sf() | 0.2 | 0.4 | | convert_time_to_seconds() | 3.1 | 1.7 | | filter_by_agency_id() | ~1 | 1.3 | | filter_by_route_id() | ~1 | 3.3 | | filter_by_route_type() | ~1 | 2.5 | | filter_by_shape_id() | 0.7 | 1.3 | | filter_by_spatial_extent() | 2.5 | 3.1 | | filter_by_stop_id() | 3.6 | 3.0 | | filter_by_time_of_day() | 1.4 | 1.7 | | filter_by_trip_id() | 0.6 | 0.6 | | filter_by_weekday() | 0.7 | 0.7 | | frequencies_to_stop_times() | – | 12 | | get_stop_times_patterns() | 1.4 | ~1 | | get_trip_duration() | 3.1 | ~1 | | get_trip_geometry()† | 0.8 | ~1 | | get_trip_length()† | 1.9 | ~1 | | get_trip_segment_duration() | 64 | 7.9 | | get_trip_speed()† | 1.4 | ~1 | | merge_gtfs()† | 0.1 | 0.1 | | read_gtfs() | 1.4 | 1.8 | | set_trip_speed()† | 1.4 | ~1 | | write_gtfs() | 1.2 | 2.4 |

Most gains grow with feed size: on a feed with 900,000 stop_times rows, convert_time_to_seconds() is about 20 times faster, filter_by_spatial_extent() 25 times, filter_by_time_of_day() 7 times, and get_trip_segment_duration() and get_trip_duration() (when unit isn't "s") 60 and 10 times. merge_gtfs() with prefix is about 2.3 times faster with 1.15 million stop_times rows, get_children_stops() about 250 times faster with 20,000 stops, and read_gtfs() is much faster on feeds with large calendar_dates tables. - get_trip_length(), get_trip_geometry(), get_shape_length(), get_stop_distances() and the functions that use them run their C++ code in parallel, with data.table::getDTthreads() threads (set with data.table::setDTthreads()), or on a single thread where the compiler doesn't support OpenMP. Results don't depend on the number of threads. - Trip lengths are always calculated on the {s2} sphere, regardless of sf::sf_use_s2(). convert_sf_to_shapes() also calculates distances on that sphere: they match the previous ones within a micrometre with sf::sf_use_s2(TRUE) (the default), and differ by up to about 0.4% from the ellipsoidal ones previously calculated with sf::sf_use_s2(FALSE). - gtfstools no longer depends on {units} (#84). set_trip_speed() now converts speeds in m/s or mph with exact factors, so in rare borderline cases a new time may be one second earlier than in version 1.4.0. - download_validator() detects the latest validator version automatically. PR contribution by @baarthur. - Invalid dates (e.g. 20240230) are still converted to NA, but now with a warning. - frequencies_to_stop_times() raises informative errors for invalid frequencies entries and trips without a departure_time. - The warnings about route_ids, trip_ids and stop_ids not found in a feed (classes gtfstools_invalid_route_id, gtfstools_invalid_trip_id and gtfstools_invalid_stop_id) list each missing id once. - The documentation website moved to https://ipea.github.io/gtfstools/ and the GitHub repository to https://github.com/ipea/gtfstools.

gtfstools 1.4.0

New features

Notes

gtfstools 1.3.0

New features

Bug fixes

Feature deprecation

Notes

gtfstools 1.2.0

New features

Bug fixes

gtfstools 1.1.0

New features

Bug fixes

Notes

gtfstools 1.0.0

New features

Bug fixes

Notes

Potentially breaking changes

gtfstools 0.1.0



Try the gtfstools package in your browser

Any scripts or data that you put into this service are public.

gtfstools documentation built on Oct. 28, 2026, 5:13 p.m.