query/linegraph

Line Graph Query Functions

These functions query the rt_line_graph table in the Right Track Database.

Source:

Methods

(inner) buildGraph(db, callback)

Source:
See:

Build the entire Agency Line Graph

Parameters:
Name Type Description
db RightTrackDB

The Right Track DB to query

callback function

Callback function

Properties
Name Type Attributes Description
err Error

Database Query Error

graph Graph <optional>

Agency Graph

(inner) getNextStops(db, originId, destinationId, stopId, callback)

Source:

Get a List of all stops from the Agency Line Graph along all paths from the origin to the destination following the specified stop

Parameters:
Name Type Description
db RightTrackDB

The Right Track DB to Query

originId String

Origin Stop ID

destinationId String

Destination Stop ID

stopId String

Current Stop ID

callback function

Callback function

Properties
Name Type Attributes Description
err Error

Database Query Error

stops Array.<String> <optional>

List of following Stops, sorted by transfer weight

(inner) getPaths(db, originId, destinationId, callback)

Source:

Get all possible paths from the origin to the destination following the Agency Line Graph

Parameters:
Name Type Description
db RightTrackDB

The Right Track DB to Query

originId String

Origin Stop ID

destinationId String

Destination Stop ID

callback function

Callback Function

Properties
Name Type Attributes Description
err Error

Database Query Error

paths Array.<Array.<Object>> <optional>

Route Paths

Properties
Name Type Description
id String

Stop ID

weight int

Stop Transfer Weight