library(gtfs2gps)
poa <- read_gtfs(system.file("extdata/poa.zip", package = "gtfs2gps"))
poa_subset <- gtfstools::filter_by_shape_id(poa, c("T2-1", "A141-1")) |>
filter_single_trip()
poa_gps <- gtfs2gps(poa_subset)
poa_gps_sf <- gps_as_sflinestring(poa_gps)
Run the code above in your browser using DataLab