get_route_geometry: Get all trip shapes for a given route and service

View source: R/spatial.R

get_route_geometryR Documentation

Get all trip shapes for a given route and service

Description

Get all trip shapes for a given route and service

Usage

get_route_geometry(gtfs_sf_obj, route_ids = NULL, service_ids = NULL)

Arguments

gtfs_sf_obj

tidytransit gtfs object with sf data frames

route_ids

routes to extract

service_ids

service_ids to extract

Value

an sf dataframe for gtfs routes with a row/linestring for each trip

Examples

data(gtfs_duke)
gtfs_duke_sf <- gtfs_as_sf(gtfs_duke)
routes_sf <- get_route_geometry(gtfs_duke_sf)
plot(routes_sf[c(1,1350),])

r-transit/tidytransit documentation built on Oct. 19, 2024, 3:17 a.m.