The geometry of each trip is generated as in get_trip_geometry(), so it
goes from the trip's first to its last stop, either along its shape or as
straight lines between its stops, and the same limitations and warnings
apply. The trips of a route whose geometries are identical are then merged
into a single row. Trips that visit stops at different points of the same
shape thus result in different rows, even if their geometries overlap.
Only trips listed both in trips and in stop_times are considered, so
routes without any trip listed in stop_times are not included in the
output. When a trip_id is listed more than once in trips, only its first
entry is considered. With route_id = NULL, trips with a missing
route_id are grouped together, under an NA route_id. Trips without
any stop with coordinates (and, with method = "shapes", trips that can't
be located along a shape) get an empty geometry, as in
get_trip_geometry(), and these trips are counted in an empty-geometry row
of their route.