Stop

Stop

GTFS Stop

Representation of the GTFS Stop definition.

GTFS Required Fields:

  • GTFS Stop ID
  • Stop Name (RT display_name when present otherwise GTFS stop_name)
  • GTFS Stop Lat
  • GTFS Stop Lon

GTFS Optional Fields:

  • GTFS Stop Code
  • GTFS Stop Description
  • GTFS Zone ID
  • GTFS Stop URL
  • GTFS Location Type
  • GTFS Parent Station
  • GTFS Stop Timezone
  • GTFS Wheelchair Boarding

Right Track Fields:

  • RT Status ID
  • RT Transfer Weight

Module: gtfs/Stop

Constructor

new Stop(id, name, lat, lon, optionalopt)

Source:
See:

GTFS Stop Constructor

Parameters:
Name Type Attributes Description
id string

Stop ID

name string

Stop Name

lat number

Stop Latitude

lon number

Stop Longitude

optional Object <optional>

Optional Arguments

Properties
Name Type Attributes Default Description
code string <optional>

Stop Code

description string <optional>

Stop Description

zoneId string <optional>

Stop Zone ID

url string <optional>

Stop Website URL

locationType int <optional>
0

Stop Location Type

parentStation string <optional>

Stop Parent Station

timezone string <optional>

Stop Timezone Code

wheelchairBoarding int <optional>
0

Stop Wheelchair Boarding

statusId string <optional>
'-1'

Right Track Stop Status ID

transferWeight int <optional>
1

Right Track Stop Transfer Weight

Members

(static, constant) LOCATION_TYPE_ENTRANCE_EXIT :number

Source:
Default Value:
  • 2

Location Type: Station Entrance/Exit - location where passengers enter or exit a Station

Type:
  • number

(static, constant) LOCATION_TYPE_STATION :number

Source:
Default Value:
  • 1

Location Type: Station - physical structure or area that contains one or more Stops

Type:
  • number

(static, constant) LOCATION_TYPE_STOP :number

Source:
Default Value:
  • 0

Location Type: Stop - passengers board or disembark from a transit vehicle

Type:
  • number

(static, constant) WHEELCHAIR_BOARDING_NO :number

Source:
Default Value:
  • 2

Wheelchair Boarding: impossible

Type:
  • number

(static, constant) WHEELCHAIR_BOARDING_UNKNOWN :number

Source:
Default Value:
  • 0

Wheelchair Boarding: info unknown

Type:
  • number

(static, constant) WHEELCHAIR_BOARDING_YES :number

Source:
Default Value:
  • 1

Wheelchair Boarding: possible

Type:
  • number

code :string

Source:

Stop Code - short text or number that can publicly be used to identify the Stop

Type:
  • string

description :string

Source:

A description of the Stop

Type:
  • string

distance :undefined|number

Source:

The distance (in miles) from the location set by setDistance()

Type:
  • undefined | number

id :string

Source:

The unique ID representing the Stop

Type:
  • string

lat :number

Source:

The latitude of the Stop (WGS 84)

Type:
  • number

locationType :int

Source:
Default Value:
  • 0

Stop location type (stop, station, or station entrance/exit)

Type:
  • int

lon :number

Source:

The longitude of the Stop (WGS 84)

Type:
  • number

name :string

Source:

The name of the Stop

Type:
  • string

parentStation :string

Source:

Stop ID of Parent Station

Type:
  • string

statusId :string

Source:
Default Value:
  • -1

The Stop's ID used for real-time status information

Type:
  • string

timezone :string

Source:

The timezone code for the Stop

Type:
  • string

transferWeight :Number

Source:
Default Value:
  • 1

A value indicating the Stop's likely transfer-availability. A Stop with a higher transfer weight will likely be more suitable as a transfer Stop than one with a lower transfer weight.

Type:
  • Number

url :string

Source:

The fully-qualified, escaped URL of the Stop's web page

Type:
  • string

wheelchairBoarding :Number

Source:
Default Value:
  • 0

Value indicating whether wheelchair boardings are possible for the Stop

Type:
  • Number

zoneId :string

Source:

The fare zone of the Stop (used by the fare rules table)

Type:
  • string

Methods

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

Source:

Sort Stops by Distance (if set)

Parameters:
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns:

compare integer

Type
number

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

Source:

Sort Stops by ID (ascending)

Parameters:
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns:

compare integer

Type
number

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

Source:

Sort Stops by Name (ascending)

Parameters:
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns:

compare integer

Type
number

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

Source:

Sort Stops by Transfer Weight (descending)

Parameters:
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns:

compare integer

Type
number

setDistance(lat, lon)

Source:

Set the Stop's distance property to the distance from the specified location.

Parameters:
Name Type Description
lat number

Location's latitude (decimal degrees)

lon number

Location's longitude (decimal degrees)