new Shape( id, shapePtLat, shapePtLon, shapePtSequence [, optional ] )

Description

GTFS Shape

Representation of the GTFS Shape data

GTFS Required Fields:

  • Shape ID
  • Shape Point Latitude
  • Shape Point Longitude
  • Shape Point Sequence

GTFS Optional Fields:

  • Shape Distance Traveled

Module: gtfs/Shape

Parameters
Name Type Attributes Description
id string

Shape ID

shapePtLat number

Shape Point Latitude

shapePtLon number

Shape Point Longitude

shapePtSequence int

Shape Point Sequence

optional Object <optional>

Optional Arguments

Name Type Attributes Description
shapeDistTraveled number <optional>

Shape Distance Traveled

Details

Members


id :string

Description

The ID of the Shape (referenced in the gtfs_trips table)

Details
string

shapePtLat :number

Description

The latitude of a Shape's point

Details
number

shapePtLon :number

Description

The longitude of a Shape's point

Details
number

shapePtSequence :int

Description

The sequence of the point along a Shape

Details
int

shapeDistTraveled :number

Description

The distance traveled to the point from the start of the Shape

Details
number

Methods


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

Description

Sort the points of a Shape by their sequence

Parameters
Name Type Description
a Stop

first Shape

b Stop

second Shape

Returns

compare integer

Details