-
Notifications
You must be signed in to change notification settings - Fork 0
35 addapt osm shapes match routes to find osm routes for gtfs without shapes #53
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
35 addapt osm shapes match routes to find osm routes for gtfs without shapes #53
Conversation
…nt for partial gtfs and osm route name match
…a relaxed (all gtfs_match words must (all words in gtfs_match must be in osm_match, ignoring case)
…-to-find-osm-routes-for-gtfs-without-shapes
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.
Pull request overview
This PR enhances the osm_shapes_match_routes() function to support flexible matching between GTFS and OSM route identifiers, allowing partial string matching when exact matches are not available. It also adds new output fields and improves error handling.
Changes:
- Added
gtfs_osm_match_exactparameter to enable partial string matching between GTFS and OSM route identifiers - Enhanced function documentation and vignette content to clarify the matching algorithm
- Added
osm_refandosm_namefields to the function output for better traceability - Fixed spelling errors and improved code robustness with edge case handling
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| R/query_osm_shapes_match_routes.R | Adds flexible matching logic, new output fields, edge case handling for empty results, and deduplication of OSM routes |
| man/osm_shapes_match_routes.Rd | Documents new gtfs_osm_match_exact parameter and new output columns |
| man/osm_shapes_to_routes.Rd | Fixes spelling error: "dissagregated" → "disaggregated" |
| man/get_way_frequency_hourly.Rd | Fixes grammatical error: removes duplicate "the" |
| vignettes/osm.Rmd | Reorganizes content by moving centerlines section to end and expanding documentation of matching algorithm |
| vignettes/osm_update.Rmd | Adds missing file_handler initialization for logging |
| vignettes/analyse.Rmd | Updates reference to centerlines section after reorganization |
| dev/test_osm_shapes_match_routes_local.R | Adds CP Portugal test case with custom GTFS manipulation and partial matching |
| NAMESPACE | Adds stringi import |
| DESCRIPTION | Adds stringi dependency |
Comments suppressed due to low confidence (1)
R/query_osm_shapes_match_routes.R:1
- The replacement 'InterR' for 'IR' appears to be a truncated name. Based on the context of other replacements (e.g., 'Alfa Pendular', 'Intercidades', 'Regional'), this should likely be 'InterRegional' or the full service name.
#' Get OSM routes that match shapes, based on geometrical match
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.