# GTFS Distances

**URL:** <https://opendataforum.transport.nsw.gov.au/t/gtfs-distances/1583>\
**Category:** Uncategorized\
**Created:** [March 21, 2019, 12:55am UTC](https://opendataforum.transport.nsw.gov.au/t/gtfs-distances/1583 "2019-03-21T00:55:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![z3375940](https://avatars.discourse-cdn.com/v4/letter/z/59ef9b/32.png) [@z3375940](https://opendataforum.transport.nsw.gov.au/u/z3375940)\
**Post date:** [March 21, 2019, 12:55am UTC](https://opendataforum.transport.nsw.gov.au/t/gtfs-distances/1583/1 "2019-03-21T00:55:24Z")

</div>

Hello,

I’m trying to use the shape\_dist\_traveled from stop\_times to work out approximate trip distances and it seems like this doesn’t represent real life travel distances, as per [Reference &nbsp;|&nbsp; Static Transit &nbsp;|&nbsp; Google Developers](https://developers.google.com/transit/gtfs/reference/).

For example - this is showing maximum trip distances for Mondays. There are a significant amount showing trip distances about 400km. When looking at some of the trips \>800km, their real life distance is closer to \< 200km. _(I’m assuming shape\_dist\_traveled is measured in meters, so have already divided by 1000)_ .

 ![image.png](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/24b52e931dea5704fc424cf901710936315edd2b.png)

Even when you take out regional trips, and only consider the Sydney Bus Network they’re still too high. Cross referencing those outliers (\>400km), the real distance shown on the map should be closer to ~25km.

 ![image.png](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/7971605150a77e5f2c1a652fcf8656ccbe542ad9.png)

And then when you take those outliers above 200km out, there seems to be a divide between 10km and 100km values. When you consider Penrith -\> Sydney CBD ~55km this has got to be wrong.

 ![image.png](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/7875dd1e0ef00d04f77b7615a1b17a03d217e5c0.png)

I don’t think this is just an issue of increasing error with increasing stop sequence as some 2nd stops jump from 0km to \>20km in under 5 minutes (over 200km/hr!).

Hoping this is just my misunderstanding of what shape\_dist\_traveled can be used for, but would appreciate some clarification.

Thanks,  
Katie

---

<div class="post-metadata">

**Author:** ![Qantas94Heavy](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/qantas94heavy/32/271_2.png) [@Qantas94Heavy](https://opendataforum.transport.nsw.gov.au/u/Qantas94Heavy)\
**Post date:** [March 24, 2019, 1:12pm UTC](https://opendataforum.transport.nsw.gov.au/t/gtfs-distances/1583/2 "2019-03-24T13:12:04Z")

</div>

Hey Katie,

Seems like you’re an observant one indeed 😉

`shape_dist_traveled` is indeed meant to be the real distance travelled along the route in metres, as listed in the [Buses GTFS technical documentation](https://opendata.transport.nsw.gov.au/sites/default/files/TfNSW_Realtime_Bus_Technical_Doc_v2.2.pdf):

> The shape\_dist\_traveled field positions a shape point as a  
> distance travelled along a shape from the first shape point.
> 
> The shape\_dist\_traveled field represents a real distance travelled  
> along the route in meters.
> 
> The values used for shape\_dist\_traveled will increase along with  
> stop\_sequence: they cannot be used to show reverse travel along  
> a trip.

I think if you try looking at those with large discrepancies, you’ll find that they’re off by a factor of 10. ☹

One of many examples of this is trip `180.TA.31-307-sj2-1.3.R`, which has a `shape_dist_traveled` of 100014.2 at bus stop 201944. Route 307 to Port Botany is certainly not 100 km long!

Hope someone can fix this soon!

- Karl
