new Stop( id, name, lat, lon [, optional ] )

Description

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

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

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

Details

Members


id :string

Description

The unique ID representing the Stop

Details
string

name :string

Description

The name of the Stop

Details
string

lat :number

Description

The latitude of the Stop (WGS 84)

Details
number

lon :number

Description

The longitude of the Stop (WGS 84)

Details
number

code :string

Description

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

Details
string

description :string

Description

A description of the Stop

Details
string

zoneId :string

Description

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

Details
string

url :string

Description

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

Details
string

locationType :int

Description

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

Details
int

0


parentStation :string

Description

Stop ID of Parent Station

Details
string

timezone :string

Description

The timezone code for the Stop

Details
string

wheelchairBoarding :Number

Description

Value indicating whether wheelchair boardings are possible for the Stop

Details
Number

0


statusId :string

Description

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

Details
string

-1


transferWeight :Number

Description

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.

Details
Number

1


distance :undefined|number

Description

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

Details
undefined | number

Methods


setDistance( lat, lon )

Description

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)

Details

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

Description

Sort Stops by ID (ascending)

Parameters
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns

compare integer

Details

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

Description

Sort Stops by Name (ascending)

Parameters
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns

compare integer

Details

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

Description

Sort Stops by Transfer Weight (descending)

Parameters
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns

compare integer

Details

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

Description

Sort Stops by Distance (if set)

Parameters
Name Type Description
a Stop

first Stop

b Stop

second Stop

Returns

compare integer

Details