Skip to content
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

Incorrect mapping of "33rd Street" line to JSQ_33_HOB route #22

Open
cedarbaum opened this issue Dec 27, 2023 · 1 comment
Open

Incorrect mapping of "33rd Street" line to JSQ_33_HOB route #22

cedarbaum opened this issue Dec 27, 2023 · 1 comment

Comments

@cedarbaum
Copy link

This API is returning the incorrect route for the "33rd Street" line. Below is an example response from the demo site where the line name is "33rd Street" but the route is JSQ_33_HOB. I've also included a screenshot from the official PATH website during the same time, which confirms the expected route is "33rd Street" without stopping at Hoboken.

I noticed this when using the downstream path-train-gtfs-realtime API. I am working on a patch to handle this case within that project for now. Please let me know if there's any further details I can provide, and thanks for your work on this project!

{
 "upcomingTrains": [
  {
   "lineName": "33rd Street",
   "headsign": "33rd Street",
   "route": "JSQ_33_HOB",
   "routeDisplayName": "Journal Square - 33rd Street (via Hoboken)",
   "direction": "TO_NY",
   "lineColors": [
    "#FF9900"
   ],
   "status": "ON_TIME",
   "projectedArrival": "2023-12-27T00:09:21Z",
   "lastUpdated": "2023-12-27T00:01:24Z"
  },
 ]
}

CleanShot 2023-12-26 at 19 03 50@2x

@ghost
Copy link

ghost commented Feb 22, 2024

I guess route name query SQL needs to be more specific.
The SQL used for query route related info by headsignName and headsignColors is here:
https://github.com/mrazza/path-data/blob/master/server/PathServices/PathSqlDbRepository.cs#L217
A quick run of the query of the DB download in an hour returns 2 matches, since we are using LIMIT 1 the first match will always be returned.

Capture

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

No branches or pull requests

1 participant