Routing With GTFS

1194
3
02-06-2019 10:32 AM
TerryKarlson
New Contributor

I'm looking for help with understanding how to route my public transit trips via the GTFS data I've imported. 

I've gone through all the steps on the User Guide, as well as the online lectures. However, Network Analyst will only route my trips on my streets file ("Streets_UseThisOne). Whenever I try to route on TransitLines (which seems the most logical when attempting to route public transit, even though these are only lines between stops), it gives me a non-traversable error. It correctly routes on the Streets_UseThisOne layer, but this isn't representative of where my public transit is running. 

To further elaborate on my project: I'm attempting to compare historic GTFS feeds with current GTFS feeds. Essentially, the goal is to understand how travel time has changed over the years (I.e. transit services between 1995 and 2005). I'd like to be able to take two stops. One from 1995 and one from 2005 and see how the travel time has changed, either due to road closures/improvements or due to the transit system changing its routes. From my understanding, these tools should help me do this, but I don't seem to be able to acquire the correct results. 

Am I missing something?

0 Kudos
3 Replies
MelindaMorang
Esri Regular Contributor

Hello Terry.

If your results seem to be never using the transit lines, please review the probably causes and solutions listed here: public-transit-tools/TroubleshootingGuide.md at master · Esri/public-transit-tools · GitHub 

If that doesn't help, could you please clarify this comment?

it gives me a non-traversable error

What is the error message, and when/where did you see it? (Example: when you clicked Solve)

Regarding your ultimate goal: Yes, this should be doable.  It's probably best if you have two separate networks, one for the older data and one for the newer data.

0 Kudos
TerryKarlson
New Contributor

Hi Melinda, 

Thank you for taking the time to help me. I heeded your advice and went through the troubleshooting guide. It turns out that my Stops_Snapped2Streets were not in "override". I adjusted this setting accordingly. Additionally, I didn't have the "Use Start Time" checked in the Analysis Settings. After also changing this setting, everything else in the troubleshooting guide seemed to be similar to what I had. However, I was still receiving inaccurate results. I decided to move onto the "None of the Above" section. 

I have attached pictures that will hopefully help me explain myself. The picture below is a shot of the two stops I selected from the TransitLines layer (Green lines). Note: the red lines are my Streets_UseThisOne layer. The streets somehow got broken up or pixelated when I took a screenshot. It's not this way on the computer. The orange lines are the route shape I made using the Display GTFS Route Shapes tool. I did this to compare the "solve" tool to the actual shape. The darker orange/brown color is the route from the "solve" tool. 

To explain the non-traversable error I occasionally receive. Here are my results:  As you can see, I moved stop 2 slightly to the left (more on the green TransitLines layer) and I received this message when I try to "solve" the route. I moved it back for the purpose of running through the debugging process. After moving it back, it correctly solves the two stops, but the routing is off. See below: 

Here you can see that it solves the route, but it takes the route in an unusual path. The spots circled in yellow are where the route does not line up with the route shape from the Display GTFS Shape tool I used. This makes me think it is still set on routing via the Streets layer. 

Any ideas?

0 Kudos
MelindaMorang
Esri Regular Contributor

Okay, several things going on here...

First, you should NOT expect the transit lines produced in Add GTFS to a Network Dataset to represent that actual streets or other paths taken by the transit lines in the system.  They are simply straight lines connecting stops and are meant to represent the logical connections between stops in the transit network, NOT for accurate visualization of the transit lines.  Display Route Shapes, on the other hand, specifically uses the GTFS shapes.txt file and turns those into features for visualization on the map.  Because GTFS has somewhat of a disconnection between shapes.txt and the files that represent the schedules, it's much much much easier for Add GTFS to a Network Dataset to just use straight lines.

Next, after you corrected those problems with your network dataset's settings, did you run Build Network and re-run Get Network EIDs?  Without doing those things, the changes you made aren't fully baked into the network.

Finally, the non-traversable error to be looks like one of two things:

1) Your network has some kind of restriction attribute set up, and some roads are actually restricted (non-traversable).  Perhaps the restriction is configured incorrectly.

2) You forgot to set up the layer's network location settings according to this section of the user's guide: public-transit-tools/UsersGuide.md at master · Esri/public-transit-tools · GitHub .  As a result, sometimes the input points are being located on transit lines, and bad things are happening.

0 Kudos