Route

Route

GTFS Route

Representation of the GTFS Route definition.

GTFS Required Fields:

  • Route ID
  • Route Short Name
  • Route Long Name
  • Route Type

GTFS Optional Fields:

  • Route Agency
  • Route Description
  • Route URL
  • Route Color
  • Route Text Color
  • Route Sort Order

Module: gtfs/Route

Constructor

new Route(id, shortName, longName, type, optionalopt)

Source:
See:

Route Constructor

Parameters:
Name Type Attributes Description
id string

Route ID

shortName string

Route Short Name

longName string

Route Long Name

type int

Route Type

optional Object <optional>

Optional Arguments

Properties
Name Type Attributes Default Description
agency Agency <optional>

Route Agency

description string <optional>

Route Description

url string <optional>

Route Website URL

color string <optional>
ffffff

Route Color

textColor string <optional>
000000

Route Text Color

sortOrder int <optional>

Route Sort Order

Members

(static, constant) ROUTE_TYPE_BUS :number

Source:
Default Value:
  • 3

Route Type: Bus

Type:
  • number

(static, constant) ROUTE_TYPE_CABLE_CAR :number

Source:
Default Value:
  • 5

Route Type: Cable Car

Type:
  • number

(static, constant) ROUTE_TYPE_FERRY :number

Source:
Default Value:
  • 4

Route Type: Ferry

Type:
  • number

(static, constant) ROUTE_TYPE_FUNICULAR :number

Source:
Default Value:
  • 7

Route Type: Funicular

Type:
  • number

(static, constant) ROUTE_TYPE_GONDOLA :number

Source:
Default Value:
  • 6

Route Type: Gondola

Type:
  • number

(static, constant) ROUTE_TYPE_LIGHT_RAIL :number

Source:
Default Value:
  • 0

Route Type: Light Rail

Type:
  • number

(static, constant) ROUTE_TYPE_RAIL :number

Source:
Default Value:
  • 2

Route Type: Rail

Type:
  • number

(static, constant) ROUTE_TYPE_SUBWAY :number

Source:
Default Value:
  • 1

Route Type: Subway

Type:
  • number

agency :Agency

Source:

The parent Agency of the route

Type:

color :string

Source:
Default Value:
  • ffffff

The color that corresponds to the route and represented as a six-figure hexadecimal number (without the leading '#')

Type:
  • string

description :string

Source:

Description of the Route

Type:
  • string

id :String

Source:

Unique ID that identifies a route

Type:
  • String

longName :string

Source:

The full name of a route

Type:
  • string

shortName :string

Source:

The short name of a route

Type:
  • string

sortOrder :int

Source:

Field used for sorting the display of Routes

Type:
  • int

textColor :string

Source:
Default Value:
  • 000000

The text color that corresponds to the route's color as a six-figure hexadecimal number (without the leading '#')

Type:
  • string

type :int

Source:

The type of transportation used on a route

Type:
  • int

url :string

Source:

Route website URL

Type:
  • string

Methods

(static) sortByName(a, b) → {number}

Source:

Sort Route by Name (ascending)

Parameters:
Name Type Description
a Route

first Route

b Route

second Route

Returns:

compare integer

Type
number