I have created a network dataset using GTFS data, and it appears to be working well when running routes and service areas. However, upon close inspection, some of the network edges do not follow the roads and cut across lots of land (see attached photo). I am trying to overlap the network with polygons of flooding, so it is important that the routes are geographically accurate. Any advice you could give would be greatly appreciated! Thank you.
Hello. I am assuming you're using ArcGIS Pro and have created your network dataset from GTFS data following our tutorial.
What you see is the correct behavior. The LineVariantElements generated from the GTFS To Network Dataset Transit Sources tool are simply straight-line connectors between adjacent stops. They do not follow the streets that the actual buses travel on.
Here is the key info from the tool's documentation: The LineVariantElements features are not intended to represent the actual geographic paths taken by buses, trains, or other public transit vehicles but are instead representative of logical connections in the transit system. LineVariantElements features are not meant to be used for visualization. The Public Transit evaluator in the network dataset will use the public transit schedules to determine the travel time required to traverse a LineVariantElements feature, so its shape and length are irrelevant. However, you can optionally edit the shapes of the LineVariantElements features manually, but do not split or merge the features.
I think it's going to be tough for you to make this work with your flooding polygons, but it kind of depends on what you're trying to do.
If you just want to see which transit routes might be affected by flooding in certain areas, it might work better for you to create a simple feature class of your GTFS shapes.txt file using the GTFS Shapes To Features tool. That feature class will show the paths traveled by the vehicles, at least according to the data the transit agency has provided (which, in my experience, depending on the agency, can sometimes have problems). You could overlay these with your flooding polygons.
That approach doesn't do anything with routing, through. But here's the problem if you tried to make your flood polygons work with a routable network, even assuming the transit lines were in the right place geographically. Suppose you use your flood polygons as a barrier, so certain segments of the route and certain stops are inaccessible. The solver will be smart enough to prevent a traveler traveling on transit from traveling through that section. However, the transit lines further down the line, after the flooded area, don't know that the previous parts of the line are blocked or diverted or delayed, so they continue running on the same schedule. A passenger will still be allowed to board the bus and travel onwards using the same schedule, even though that's unrealistic.
If you post more details about what analysis question you're trying to solve, maybe we can brainstorm a good solution.
Thank you so much for all your help! I really appreciate it. My question is looking at the impact of flooding on transportation infrastructure, so the GTFS Shapes to Features tool could be really helpful to answer part of that, so thank you for that suggestion. However, I was also hoping to be able to look at the impact of flooding on commuting time (so pretty much exactly what you were describing in that last paragraph)- such as looking at the travel time difference between flooded and un-flooded scenarios between 2 points along the network. I was thinking about either importing flood polygons directly as a barrier, or another idea I had was to import flooded stops as point barriers. I'm curious if you think that would work using the network dataset or not! Thank you again!
Yeah, unfortunately, for the reasons I described above, I don't think the flooding scenario will behave nicely with transit routing. The schedules are stored in lookup tables, and so the start time for one segment along the route wouldn't know about delays in the previous legs. Or if the bus can't even get through the flooded area at all, it would never arrive to serve the stops after the flooded area in reality, but the software doesn't have a way to know that. It just isn't going to do what you want it to do.
Is the flood in a predictable area so the transit system already has well-defined protocols in place for when the flooding occurs? Like, do they just know that whenever the area is flooded, Route 10 gets diverted and Route 11 goes only to Stop M and doesn't continue on to N-Z?
If that's the case, you can build that into your network. If you can figure out how to either model those changes in GTFS or in the Public Transit Data Model tables themselves, then you can turn on and off specific lines and runs using the supported attribute parameters: https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/public-transit-evaluator.htm#ESRI_SE...
Basically, you could have one version of Route 10 for non-flood days and a different version for flood days. You would create a travel mode for non-flood days that turns off flood-Route-10 and a different travel mode for flood days that turns off normal-Route-10. Does that make sense?
I know that won't be easy to model unless your transit agency already provides the data like this.