-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: New rule - SingleShapePointValidator for flagging shapes with a single shape point #1753
Conversation
Thanks for opening this pull request! You're awesome. We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of titles with semantic prefixes:
|
Hello @praneethd7, thank you for contributing to the GTFS Validator. I have two pieces of feedback:
|
Hi @qcdyx! Thank you for your suggestions. I have re-formatted the code according to the Google Java format. Is there a way to know which are those 22 feeds that have this error? Also, I am not sure if I have access to all of them. Please let me know.😄 |
Hello @praneethd7 Yes, you have access to those 22 feeds. To get them, goto https://github.com/MobilityData/gtfs-validator/actions/runs/9197621511?pr=1753, scroll down to bottom, find the [acceptance_test_report] artifact(https://github.com/MobilityData/gtfs-validator/actions/runs/9197621511/artifacts/1541824946), and download it. |
@qcdyx Thank you for helping me with the code formatting. I have manually checked the 22 feeds and they all have |
@emmambd Should we consult with the spec team to verify the naming and description of the single_shape_point notice? |
/** | ||
* The shape within `shapes.txt` contains a single shape point. | ||
* | ||
* <p>A shape should contain more than one shape point to visualize the route on any GIS software |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request to modify description to "A shape should contain more than one shape point to visualize the route" to be more generic.
@qcdyx No, that one's for me to review! @praneethd7 The name looks great! I made a minor comment on the description for the sake of being generic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - ready to be merged after the modification of rule description
@praneethd7 Great, you PR is merged. Thanks again for contributing to GTFS Validator. |
Summary:
Reference - #1733. Some GTFS feeds have shapes with a single shape point. These route shapes cannot be visualized on any GIS software (which requires LineString) and are therefore indicative of an error in the creation (as a line requires a minimum of two points)
Expected behavior:
The new rule flags such cases with the
single_shape_point
notice which reports theshape_id
andcsvRowNumber
of the shape with a single shape point(one row in the feed).Example Feed - LANTA GTFS:
![image](https://private-user-images.githubusercontent.com/87244228/329313530-3491cbbb-6e5a-4ce5-a13a-b0a701d4ce62.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEwODM5OTgsIm5iZiI6MTcyMTA4MzY5OCwicGF0aCI6Ii84NzI0NDIyOC8zMjkzMTM1MzAtMzQ5MWNiYmItNmU1YS00Y2U1LWExM2EtYjBhNzAxZDRjZTYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE1VDIyNDgxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTViN2FkZmQwYzJmNWUzNmIxOWFkMDYzMzNmZjBmNmI5ZjUxZWM0MDdlZWI0NjM5NDQzNjI3OTYzYmZhMDc4OWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jEPbiKrW1RZCQ8zODdITkF4u8NCqW6QL2C2OSrdEBvU)
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything