Skip to content

Conversation

@gmatosferreira
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a 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_exact parameter to enable partial string matching between GTFS and OSM route identifiers
  • Enhanced function documentation and vignette content to clarify the matching algorithm
  • Added osm_ref and osm_name fields 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.

gmatosferreira and others added 2 commits January 15, 2026 17:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gmatosferreira gmatosferreira merged commit 3220d25 into main Jan 15, 2026
1 check passed
@gmatosferreira gmatosferreira deleted the 35-addapt-osm_shapes_match_routes-to-find-osm-routes-for-gtfs-without-shapes branch January 15, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

addapt osm_shapes_match_routes to find osm routes for GTFS without shapes

2 participants