简体   繁体   English

一条路线有多个行程标志?

[英]Multiple trip headsigns for a route?

So I just noticed this in my application, but when I get a list of routes that services a stop, I get multiple trip_headsigns for a specific route, but they all run the same route when I get all the stops and the route shape. 因此,我在应用程序中注意到了这一点,但是当我得到一个服务于停靠点的路线列表时,会得到一个特定路线的多个trip_headsign,但是当我获得所有停靠点和路线形状时,它们都在同一条路线上行驶。 Am I missing something here? 我在这里想念什么吗? Or can somebody explain why? 还是可以解释为什么? Here is how I get routes for specific stop: 这是我获取特定站点路线的方法:

    SELECT DISTINCT t.trip_headsign, r.route_short_name,r.route_long_name
    FROM stop_times st INNER JOIN trips t
    ON t.trip_id = st.trip_id
    INNER JOIN routes r
    ON r.route_id = t.route_id
    WHERE st.stop_id = <stop_id>

Here is how I get all the stops for a specific route returned by the query 这是我如何获取查询返回的特定路线的所有站点

      SELECT DISTINCT t.trip_id, s.stop_code, s.stop_name, s.stop_lat, s.stop_lon, t.shape_id, st.arrival_time
      FROM trips as t INNER JOIN stop_times as st
      ON st.trip_id = t.trip_id
      INNER JOIN stops as s ON s.stop_id = st.stop_id
      WHERE t.route_id = <route_id>
      AND t.service_id = "Weekdays"
      AND t.direction_id = <direction_id>

But as I said, I get multiple trip_headsigns as a query return from the first one, but when I run the second query I get the same route for all those trip_headsigns. 但是正如我所说,我从第一个查询返回了多个trip_headsigns作为查询返回值,但是当我运行第二个查询时,对于所有那些trip_headsigns却获得了相同的路由。 Any help/comments/ideas are appreciated! 任何帮助/意见/想法表示赞赏!

Often a transit route has multiple branches that operate over different portions of a single path through the network. 通常,转接路线具有多个分支 ,它们在通过网络的单个路径的不同部分上运行。 As a real-world example, York Region Transit operates route 85 (PDF link) with two branches, 85 and 85C. 举一个真实的例子, 约克地区交通局运营着85条路线 (PDF链接),并设有两个分支机构85和85C。 Both operate along the same east-west corridor but vary in the distance they cover: The western-most portion of the route is served only by the 85 branch. 两者都沿相同的东西走廊运行,但覆盖的距离不同:路线的最西端仅由85个分支服务。

To make sure riders are able to get on the right bus, the headsign on each bus along this route indicates which branch it is following on its trip: Riders waiting at a westbound stop might see a bus displaying either "85 Napa Valley" or "85C Islington", and choose to get on or not based on how far they need to go. 为了确保车手能够乘坐正确的公交车,每条公交车上的路标均会指示其行驶的路线:在西行站等候的车手可能会看到显示“ 85 Napa Valley”或“ 85C Islington”,并根据他们需要走多远选择是否继续前进。

I expect this is what you're seeing in your data: Multiple branches of the same route that cover different portions of the same basic path. 我希望这是您在数据中看到的内容:同一路径的多个分支覆盖了同一基本路径的不同部分。 Note that YRT's 85 and 85C share the same path (ie shape) through the network; 请注意,YRT的85和85C通过网络共享相同的路径(即形状)。 effectively, the 85C just ends its trips early. 实际上,85C只是提前结束了行程。 But since they're merely variations on the same basic route, it makes sense for them to be modelled in GTFS as a single route with trips that vary in their headsign and the distance they travel. 但是,由于它们只是同一基本路线的变体,因此将它们在GTFS中建模一条单行路线是有意义的,其行程在其首标和行进距离上有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM