Skip to content

Commit

Permalink
added public_only and WTT flags to atco import consistent with NR import
Browse files Browse the repository at this point in the history
(atoc data doesn't seem to have many non-public moves in it to start with)
  • Loading branch information
oweno-tfwm committed Sep 8, 2023
1 parent f8ef3d4 commit d02c8f4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions R/atoc.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#' @param transfers Logical, should transfers.txt be generated (default TRUE)
#' @param missing_tiplocs Logical, if true will check for
#' any missing tiplocs against the main file and add them.(default TRUE)
#' @param working_timetable Logical, should WTT times be used instead of public times (default FALSE)
#' @param public_only Logical, only return calls/services that are for public passenger pickup/set down (default TRUE)
#' @family main
#'
#' @details Locations
Expand Down Expand Up @@ -44,7 +46,9 @@ atoc2gtfs <- function(path_in,
agency = "atoc_agency",
shapes = FALSE,
transfers = TRUE,
missing_tiplocs = TRUE) {
missing_tiplocs = TRUE,
working_timetable = FALSE,
public_only = TRUE) {
# Checkmates
checkmate::assert_character(path_in, len = 1)
checkmate::assert_file_exists(path_in)
Expand Down Expand Up @@ -103,7 +107,9 @@ atoc2gtfs <- function(path_in,
file = files[grepl(".mca", files)],
silent = silent,
ncores = 1,
full_import = TRUE
full_import = TRUE,
working_timetable = working_timetable,
public_only = public_only
)


Expand Down Expand Up @@ -173,7 +179,8 @@ atoc2gtfs <- function(path_in,
stops = stops,
schedule = schedule,
silent = silent,
ncores = ncores
ncores = ncores,
public_only = public_only
)
rm(schedule)
gc()
Expand Down

0 comments on commit d02c8f4

Please sign in to comment.