Select to view content in your preferred language

How to generate the actual geometry of line variant elements using "GTFS To Public Transit Data Model" tool?

1389
3
Jump to solution
01-26-2022 12:01 AM
Allenlai
New Contributor

The length and shape of the line feature aren't used by the Public Transit evaluator to calculate the travel time. When I create my data model tables from GTFS data using the GTFS To Public Transit Data Model tool, the line variant elements will be simple straight lines connecting adjacent transit stops.

However, it is really matter to show the actual geometry of line variant elements using the service area analysis tool. It doesn't make straightforward to display the coverage of the public transit lines and stops using the simple straight lines.

Therefore, my question is how to generate the actual geometry of line variant elements. Maybe it will be good choice to replace the shape of line variant elements using "GTFS To Public Transit Data Model" tool. However, I could not find the available methods to achieve that. 

Give me some hits or anything suggestions,  plz. Thanks a lot!

0 Kudos
1 Solution

Accepted Solutions
MelindaMorang
Esri Regular Contributor

You have understood the software's behavior correctly: GTFS To Public Transit Data Model generates straight-line connections between stops rather than attempting to create geometry that follows the streets traveled by buses. Fundamentally, the geometry is not needed for the network analysis, but the reason we built the tool this way has more to do with the fact that it is difficult or impossible to extract this information reliably from GTFS datasets. The geographic shapes of routes are stored in shapes.txt, which is an optional file that ties in only tangentially with the schedule data.

If including the actual route geometry in your network dataset is important to you, you can try using the GTFS Shapes To Features tool, which creates a line feature class from the information in the shapes.txt file of your GTFS dataset. You would then need to carefully swap out the LineVariantElement geometry for the geometry from the feature class of shapes, all the while being very careful to maintain proper network connectivity (snapping the stops to the shape features and splitting them, etc.). I do not expect this to be straightforward or automatable, and often the quality of the data in shapes.txt is not great.

You could also try using the Conflation tools to try to make the LineVariantElements match the shapes of the streets where the transit travels.

View solution in original post

3 Replies
MelindaMorang
Esri Regular Contributor

You have understood the software's behavior correctly: GTFS To Public Transit Data Model generates straight-line connections between stops rather than attempting to create geometry that follows the streets traveled by buses. Fundamentally, the geometry is not needed for the network analysis, but the reason we built the tool this way has more to do with the fact that it is difficult or impossible to extract this information reliably from GTFS datasets. The geographic shapes of routes are stored in shapes.txt, which is an optional file that ties in only tangentially with the schedule data.

If including the actual route geometry in your network dataset is important to you, you can try using the GTFS Shapes To Features tool, which creates a line feature class from the information in the shapes.txt file of your GTFS dataset. You would then need to carefully swap out the LineVariantElement geometry for the geometry from the feature class of shapes, all the while being very careful to maintain proper network connectivity (snapping the stops to the shape features and splitting them, etc.). I do not expect this to be straightforward or automatable, and often the quality of the data in shapes.txt is not great.

You could also try using the Conflation tools to try to make the LineVariantElements match the shapes of the streets where the transit travels.

Allenlai
New Contributor

Thx!!!! Your suggestion helps me a lot. I will try to swap out the LineVariantElement geometry for the geometry from the feature class of shapes. 

0 Kudos
MelindaMorang
Esri Regular Contributor

In case this topic is still relevant to you, I wanted to share that with the ArcGIS Pro 3.4 release, you can now create a new Public Transit Data Model feature class, LVEShapes, to store the pretty on-street transit route shapes for visualization instead of just the straight-line stop connections in the LineVariantElements feature class.  You can create an LVEShapes feature class from a GTFS shapes.txt file when running the GTFS To Public Transit Data Model tool.

Once you have a transit-enabled network dataset that includes LVEShapes, you can solve a Route or Closest Facility analysis and use a new downloadable prototype tool, Replace Route Geometry With LVEShapes, to post-process the output routes to swap the geometry derived from LineVariantElements with geometry derived from LVEShapes.  That tool is part of the Transit Network Analysis Tools download, which you can get from GitHub or ArcGIS Online.

0 Kudos