Select to view content in your preferred language

Public Transit Model: Change LineVariantElement to actual itineraries in shapes.txt

296
3
04-10-2024 01:47 AM
AlbertDiaz
New Contributor II

Hello,

I am running a Public Transit model in ArcGIS Pro 3.1.0. My workflow involves creating the model using GTFS files via "Create Public Transit model from GTFS", then connecting to the Street network through "Project" and then "Connect Stops...". Finally, I Create and Build the Network Dataset. The model works just fine and gives me the expected travel routes and times.

My question is about visualization: When I run "Closest Facility" or "Route" tools, the output lines I generate ("Along Network") follow the street network when walking and the LineVariantElement lines when travelling through public transport. One of the services I model is a bus route with low density of stops and as a result, the LineVariantElement lines are widely different than the road network. This produces suboptimal visual outputs (see image: Purple lines are the result of routing, bold grey are the itineraries in my shapes.txt, light gray is the street network). Is there any way I can modify the network so it uses the shapes in the shapes.txt file?

I know I can use the GTFS shapes to Features for visualization but what I really need is the routes.


Thanks a lot in advance!

0 Kudos
3 Replies
MelindaMorang
Esri Regular Contributor

Unfortunately, there really isn't a good way to do this with current Esri software.  You could try manually replacing the LineVariantElement geometry with shapes derived from shapes.txt, but you have to maintain good connectivity with the stops or the network won't work.  This would not be an easy task.

Could you tell me what you are ultimately trying to do?  Why do you need to visualize the actual on-street paths traveled by your Route and Closest Facility calculations?  Some further information will help me recommend how to approach the problem and will give me some useful requirements if we decide to support this option at some point.  Thanks!

Please keep in mind that the Network Analyst public transit-enabled networks are not optimized for passenger-facing routing apps.  A lot of components necessary for a well-functioning app of this sort are not available, including the on-street visualization using proper shapes, as you have noticed.  Rather, Network Analyst's transit capabilities are designed more for analysis and planning.

0 Kudos
AlbertDiaz
New Contributor II

Thanks for your answer Melinda!

To answer your question on what I am ultimately trying to do: I am building an Experience where I'll have a series of sites on a map. Each site has a series of linkages (i.e. tourist attraction site is linked to a series of hotels) for which I have to calculate public transport travel time. To go along with the travel time calculations I want to have the option to display the exact route a person will take to go from site A to B. For example, similarly to what appears in google maps, I'd like to have a line that shows the walking route from Site A to the closest train/metro station, then the connection between starting and final stops through bus/metro lines and finally the walking from the destination station to site B.

 

Thanks and really appreciate the support!

 

 

0 Kudos
MelindaMorang
Esri Regular Contributor

I see.  That makes sense.  Unfortunately, our tools just aren't set up very well for this type of application because we don't emphasize the passenger-facing experience.  The geometry just isn't going to look pretty without quite a lot of effort on your part.

The other problem you will likely encounter is that the transit travel time and best route may vary substantially throughout the day depending on the start time because the available transit service changes.  You would need to account for this somehow, but it's a tough problem to solve.  Some of the tools available for download described in https://github.com/Esri/public-transit-tools/blob/master/transit-network-analysis-tools/UsersGuide.m... help to summarize results over a time window, although I'm not sure how well it will work for your needs since you ultimately want to give your tourists a simple recommendation.

Sorry I can't be more helpful.