Stop Query Functions
These functions query the gtfs_stops
, rt_stops_extra
and
rt_alt_stop_names
tables in the Right Track Database.
- Source:
Methods
(inner) getStop(db, id, callback)
- Source:
Get the Stop(s) specified by ID(s) from the passed database
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db |
RightTrackDB | The Right Track Database to query |
||||||||||||
id |
string | Array.<string> | Stop ID(s) |
||||||||||||
callback |
function | Callback function Properties
|
(inner) getStopByName(db, name, callback)
- Source:
Get the Stop specified by name from the passed database
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db |
RightTrackDB | The Right Track Database to query |
||||||||||||
name |
string | Stop Name (found in either gtfs_stops, rt_alt_stop_names or rt_stops_extra tables) |
||||||||||||
callback |
function | Callback function Properties
|
(inner) getStopByStatusId(db, statusId, callback)
- Source:
Get the Stop specified by status id from the passed database
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db |
RightTrackDB | The Right Track Database to query |
||||||||||||
statusId |
string | the status id of the Stop |
||||||||||||
callback |
function | Callback function Properties
|
(inner) getStops(db, hasFeedopt, callback)
- Source:
Get all of the Stops that are stored in the passed database (sorted alphabetically), optionally filtered to only include Stops that support real-time Station Feeds.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db |
RightTrackDB | The Right Track Database to query |
||||||||||||||
hasFeed |
boolean |
<optional> |
false
|
When true, only return Stops that support real-time Station Feeds. When false, include all Stops. |
||||||||||||
callback |
function | Callback function Properties
|
(inner) getStopsByLocation(db, lat, lon, optionsopt, callback)
- Source:
Get Stops sorted by distance from the specified location. Optionally, filter
the returned stops to include up to count
results and/or within distance
miles from the location. Also, the returned Stops can be filtered to include
only Stops that support real-time Station Feeds and/or are associated with a
specific Route.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db |
RightTrackDB | The Right Track Database to query |
|||||||||||||||||||||
lat |
number | Location latitude (decimal degrees) |
|||||||||||||||||||||
lon |
number | Location longitude (decimal degrees) |
|||||||||||||||||||||
options |
Object |
<optional> |
Filter Options Properties
|
||||||||||||||||||||
callback |
function | Callback function Properties
|
(inner) getStopsByRoute(db, routeId, hasFeedopt, callback)
- Source:
Get all of the Stops that are associated with the specified route (sorted alphabetically), optionally filtered to only include Stops that support real-time Station Feeds.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db |
RightTrackDB | The Right Track Database to query |
||||||||||||||
routeId |
string | The Route ID |
||||||||||||||
hasFeed |
boolean |
<optional> |
false
|
When true, only return Stops on Route that support real-time Station Feeds. When false, include all Stops on Route. |
||||||||||||
callback |
function | Callback function Properties
|