-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Describe the problem
Hello All!
Thank you for building this amazing validator. I found this issue of shapes in shapes.txt having a single shape_point. The error is pretty much self-descriptive. Constructing a line or segment with a single shape point is impossible. Therefore, these shapes cannot be visualized on any GIS software (which requires LineString) or used for computations such as stop spacings. The error could be named shape_with_single_shape_point
Describe the new validation rule
Here is a sample code written in Python. Here the variable shapes is the pandas DataFrame of shapes.txt
shape_grp_df = shapes.groupby("shape_id").count()['shape_pt_sequence'].reset_index(name='count')
len1_shapes_count = len(shape_grp_df[shape_grp_df['count'] == 1])
if len1_shapes_count > 0: Trigger Error
Sample GTFS datasets
I checked all feeds in the database catalogs. I could not do an exhaustive search as some feeds needed API keys for access. Here is a list of agencies with this issue:
- Lehigh and Northampton Transportation Authority (LANTA)
- TransLink West Coast Express
- bodo Verkehrsverbund
- BBS Schapfl
- naldo Verkehrsverbund
- Stadtwerke Heilbronn (SWHN)
- TBO Offenburg
- NVBW
- Verkehrsverbund Pforzheim-Enzkreis (VPE)
- Madison County Transit
- TransLink Vancouver
Here is a zip file for an example feed: LANTA
lanta_gtfs_feed.zip
Severity
ERROR
Shapes are supposed to describe the path that a vehicle travels along a route alignment. Having a single point in the shapes does not yield a path. Therefore, I see it as a violation of the original purpose. However, it currently does not violate the specification.
Additional context
I am happy to discuss more on this and collaborate if possible. Thank you!