Breaking changes
gtfs2gps() no longer uses {future} workers or future::plan(). The compiled step runs in ncores threads (OpenMP): the default is 2 and ncores = Inf uses all threads (data.table::getDTthreads()). parallel and strategy are deprecated and ignored: use ncores = 1 to run sequentially. This also fixes the "globals exceed the maximum allowed size" error (#277).gtfstools::interpolate_shape_dist_traveled(), in stop_sequence order, then placed at the nearest generated point of the shape. Stop placement no longer uses a search radius based on spatial_resolution, so stop patterns are no longer dropped because a stop is far from the shape. dist, cumdist and speed are about 0.11% smaller (spherical distances). snap_method is deprecated and ignored.gtfs2gps(): each trip runs from its first to its last timed stop (cumdist starts at 0; #260); speed, dist, cumdist and cumtime are rounded to 3 decimals; timestamps wrap at midnight (use cumtime for elapsed time); trip_number counts all trips of a shape.filter_single_trip() requires a GTFS object and also filters the other tables;gtfs_shapes_as_sf(), gtfs_stops_as_sf(), remove_invalid() and filter_valid_stop_times(), which warn on every call, and adjust_arrival_departure() and adjust_speed(), which warn once per session. Use the {gtfstools} equivalents named in their warnings: we strongly recommend fixing and editing GTFS data with {gtfstools} before processing them with gtfs2gps.Major changes
gtfs2gps() is much faster and uses less memory: compared with v2.1-4, about 9× faster on the poa feed, 500× on São Paulo, and 1,000× on a full Fortaleza feed (13M points: 95 min → 6 s). All shapes are converted in one pass in C++ ({cpp11} replaces {Rcpp}).Minor changes
gtfs2gps() drops duplicated rows and unused ids, ignores trips with an NA trip_id, and converts a trip_id listed under two shapes once.NaN cumtime after a stop with a departure but no arrival time; continue = TRUE, compress = TRUE not skipping shapes already saved; and filepath output for shape_ids that aren't valid file names (now %XX-encoded).read_gtfs() keeps all routes.txt columns and reads feeds without agency_id or route_short_name; write_gtfs() gains compression_level; adjust_arrival_departure() no longer modifies its input or writes negative times.gtfs2gps_shape_error warning. Loading the package no longer changes data.table's options or threads.end_time, and malformed times NA with a warning.gtfs2gps() raises classed errors instead of returning NULL when nothing can be converted, and when routes.txt is missing or the output exceeds 2.1 billion rows.gps_as_sfpoints() no longer accepts crs = NAwrite_gtfs() errors when overwrite = FALSE and the file existsspatial_resolution must be at least 1 metre.ncores = NULL uses parallelly::availableCores(omit = 1), and {parallelly} was added to Imports.ncores. closes #271. When parallel = FALSE, this argument is ignored. When parallel = TRUE, then by default the function uses all available cores minus one.Major changes
gtfs2gps now uses parallel = TRUE by default.gtfs2gps now uses gtfstools::frequencies_to_stop_times() to convert. frequency-based GTFS feeds to stop times before processing the data.Minor changes
quiet to gtfs2gps()readr, pbapply, lwgeom and magrittr from package dependencies.Major changes
gtfstools package.Minor changes
adjust_speed() now does not change very low speed (1.000000e-12 [km/h]) because these values indicate a situation of a stopped vehicle. Closed 249.filepath in gtfs2gps().gtfs2gps() now creates two points for a stop when arrival and departure exist. Speed and travel time are now calculated considering both departure_ and arrival_time columns.gtfs2gps() function.adjust_arrival_departure() to allow users set a minimum time for dis/embarking times at each stop.adjust_speed() to fix outlier speeds and replace missing speed values with a speed set by the user or the average speed of the system. The timestamp values are updated accordingly.Major changes
Minor changes
Major changes
calendar_dates.txt info. Closes #103, #124 and #141compress parameter in gtfs2gps function so that users can save the function outputs in compressed .RDS format.remove_by_route_id() to remove GTFS data by route ids. Closes #180stop_sequence in the wrong orderMinor changes
Major changes
Minor changes
gps_as_sflinestring() due to new GDALsf_multipoint by sf_point in gps_as_sf() to keep all the data