gtfs/static/types

GTFS Static Types

This module contains all type definitions for GTFS Static files. Types are organized by their source file in the GTFS specification.

Types

Represents a transit agency from agency.txt

pub type Agency {
  Agency(
    agency_id: option.Option(String),
    agency_name: String,
    agency_url: types.Url,
    agency_timezone: types.Timezone,
    agency_lang: option.Option(types.LanguageCode),
    agency_phone: option.Option(types.PhoneNumber),
    agency_fare_url: option.Option(types.Url),
    agency_email: option.Option(types.Email),
    cemv_support: CemvSupport,
  )
}

Constructors

  • Agency(
      agency_id: option.Option(String),
      agency_name: String,
      agency_url: types.Url,
      agency_timezone: types.Timezone,
      agency_lang: option.Option(types.LanguageCode),
      agency_phone: option.Option(types.PhoneNumber),
      agency_fare_url: option.Option(types.Url),
      agency_email: option.Option(types.Email),
      cemv_support: CemvSupport,
    )

    Arguments

    agency_id

    Unique identifier for the agency. Required if multiple agencies.

    agency_name

    Full name of the transit agency. Required.

    agency_url

    URL of the transit agency’s website. Required.

    agency_timezone

    Timezone of the agency. Required.

    agency_lang

    Primary language used by this agency. Optional.

    agency_phone

    Voice telephone number for the agency. Optional.

    agency_fare_url

    URL of a web page for purchasing tickets online. Optional.

    agency_email

    Email address for customer service. Optional.

    cemv_support

    Contactless EMV payment support. Optional.

Represents an area from areas.txt

pub type Area {
  Area(area_id: String, area_name: option.Option(String))
}

Constructors

  • Area(area_id: String, area_name: option.Option(String))

    Arguments

    area_id

    Unique identifier for the area. Required.

    area_name

    Name of the area. Optional.

Represents an attribution from attributions.txt

pub type Attribution {
  Attribution(
    attribution_id: option.Option(String),
    agency_id: option.Option(String),
    route_id: option.Option(String),
    trip_id: option.Option(String),
    organization_name: String,
    is_producer: Bool,
    is_operator: Bool,
    is_authority: Bool,
    attribution_url: option.Option(types.Url),
    attribution_email: option.Option(types.Email),
    attribution_phone: option.Option(types.PhoneNumber),
  )
}

Constructors

  • Attribution(
      attribution_id: option.Option(String),
      agency_id: option.Option(String),
      route_id: option.Option(String),
      trip_id: option.Option(String),
      organization_name: String,
      is_producer: Bool,
      is_operator: Bool,
      is_authority: Bool,
      attribution_url: option.Option(types.Url),
      attribution_email: option.Option(types.Email),
      attribution_phone: option.Option(types.PhoneNumber),
    )

    Arguments

    attribution_id

    Attribution ID. Optional.

    agency_id

    Agency ID. Optional.

    route_id

    Route ID. Optional.

    trip_id

    Trip ID. Optional.

    organization_name

    Organization name. Required.

    is_producer

    Is producer. Optional.

    is_operator

    Is operator. Optional.

    is_authority

    Is authority. Optional.

    attribution_url

    Attribution URL. Optional.

    attribution_email

    Attribution email. Optional.

    attribution_phone

    Attribution phone. Optional.

Bikes allowed indicator for a trip Source: GTFS reference.md - trips.txt > bikes_allowed

pub type BikesAllowed {
  NoBikeInfo
  BikesAllowedOnVehicle
  NoBikesAllowed
}

Constructors

  • NoBikeInfo

    No bike information (0 or empty)

  • BikesAllowedOnVehicle

    Vehicle can accommodate at least one bicycle (1)

  • NoBikesAllowed

    No bicycles allowed (2)

Represents a booking rule from booking_rules.txt

pub type BookingRule {
  BookingRule(
    booking_rule_id: String,
    booking_type: BookingType,
    prior_notice_duration_min: option.Option(Int),
    prior_notice_duration_max: option.Option(Int),
    prior_notice_last_day: option.Option(Int),
    prior_notice_last_time: option.Option(types.Time),
    prior_notice_start_day: option.Option(Int),
    prior_notice_start_time: option.Option(types.Time),
    prior_notice_service_id: option.Option(String),
    message: option.Option(String),
    pickup_message: option.Option(String),
    drop_off_message: option.Option(String),
    phone_number: option.Option(types.PhoneNumber),
    info_url: option.Option(types.Url),
    booking_url: option.Option(types.Url),
  )
}

Constructors

  • BookingRule(
      booking_rule_id: String,
      booking_type: BookingType,
      prior_notice_duration_min: option.Option(Int),
      prior_notice_duration_max: option.Option(Int),
      prior_notice_last_day: option.Option(Int),
      prior_notice_last_time: option.Option(types.Time),
      prior_notice_start_day: option.Option(Int),
      prior_notice_start_time: option.Option(types.Time),
      prior_notice_service_id: option.Option(String),
      message: option.Option(String),
      pickup_message: option.Option(String),
      drop_off_message: option.Option(String),
      phone_number: option.Option(types.PhoneNumber),
      info_url: option.Option(types.Url),
      booking_url: option.Option(types.Url),
    )

    Arguments

    booking_rule_id

    Unique identifier. Required.

    booking_type

    Booking type. Required.

    prior_notice_duration_min

    Minimum prior notice in minutes. Conditionally required.

    prior_notice_duration_max

    Maximum prior notice in minutes. Conditionally forbidden.

    prior_notice_last_day

    Prior notice last day. Conditionally required.

    prior_notice_last_time

    Prior notice last time. Conditionally required.

    prior_notice_start_day

    Prior notice start day. Conditionally forbidden.

    prior_notice_start_time

    Prior notice start time. Conditionally forbidden.

    prior_notice_service_id

    Prior notice service ID. Conditionally forbidden.

    message

    Message. Optional.

    pickup_message

    Pickup message. Optional.

    drop_off_message

    Drop-off message. Optional.

    phone_number

    Phone number. Optional.

    info_url

    Info URL. Optional.

    booking_url

    Booking URL. Optional.

Booking type Source: GTFS reference.md - booking_rules.txt > booking_type

pub type BookingType {
  RealTimeBooking
  SameDayBooking
  PriorDayBooking
}

Constructors

  • RealTimeBooking

    Real-time booking (0)

  • SameDayBooking

    Same-day booking (1)

  • PriorDayBooking

    Prior day(s) booking (2)

Represents a service schedule from calendar.txt

pub type Calendar {
  Calendar(
    service_id: String,
    monday: Bool,
    tuesday: Bool,
    wednesday: Bool,
    thursday: Bool,
    friday: Bool,
    saturday: Bool,
    sunday: Bool,
    start_date: types.Date,
    end_date: types.Date,
  )
}

Constructors

  • Calendar(
      service_id: String,
      monday: Bool,
      tuesday: Bool,
      wednesday: Bool,
      thursday: Bool,
      friday: Bool,
      saturday: Bool,
      sunday: Bool,
      start_date: types.Date,
      end_date: types.Date,
    )

    Arguments

    service_id

    Unique identifier for the service. Required.

    monday

    Service runs on Monday. Required.

    tuesday

    Service runs on Tuesday. Required.

    wednesday

    Service runs on Wednesday. Required.

    thursday

    Service runs on Thursday. Required.

    friday

    Service runs on Friday. Required.

    saturday

    Service runs on Saturday. Required.

    sunday

    Service runs on Sunday. Required.

    start_date

    Start date of service. Required.

    end_date

    End date of service. Required.

Represents a service exception from calendar_dates.txt

pub type CalendarDate {
  CalendarDate(
    service_id: String,
    date: types.Date,
    exception_type: ExceptionType,
  )
}

Constructors

  • CalendarDate(
      service_id: String,
      date: types.Date,
      exception_type: ExceptionType,
    )

    Arguments

    service_id

    Service ID. Required.

    date

    Date of exception. Required.

    exception_type

    Type of exception. Required.

Contactless EMV payment support indicator Source: GTFS reference.md - agency.txt > cemv_support

pub type CemvSupport {
  NoCemvInfo
  CemvSupported
  CemvNotSupported
}

Constructors

  • NoCemvInfo

    No CEMV information (0 or empty)

  • CemvSupported

    CEMV supported (1)

  • CemvNotSupported

    CEMV not supported (2)

Continuous drop-off behavior Source: GTFS reference.md - routes.txt > continuous_drop_off

pub type ContinuousDropOff {
  ContinuousStoppingDropOff
  NoContinuousStoppingDropOff
  PhoneAgencyForDropOff
  CoordinateWithDriverForDropOff
}

Constructors

  • ContinuousStoppingDropOff

    Continuous stopping drop-off (0)

  • NoContinuousStoppingDropOff

    No continuous stopping drop-off (1 or empty)

  • PhoneAgencyForDropOff

    Must phone agency for continuous drop-off (2)

  • CoordinateWithDriverForDropOff

    Must coordinate with driver for continuous drop-off (3)

Continuous pickup behavior Source: GTFS reference.md - routes.txt > continuous_pickup

pub type ContinuousPickup {
  ContinuousStoppingPickup
  NoContinuousStoppingPickup
  PhoneAgencyForPickup
  CoordinateWithDriverForPickup
}

Constructors

  • ContinuousStoppingPickup

    Continuous stopping pickup (0)

  • NoContinuousStoppingPickup

    No continuous stopping pickup (1 or empty)

  • PhoneAgencyForPickup

    Must phone agency for continuous pickup (2)

  • CoordinateWithDriverForPickup

    Must coordinate with driver for continuous pickup (3)

Direction of travel for a trip Source: GTFS reference.md - trips.txt > direction_id

pub type DirectionId {
  Outbound
  Inbound
}

Constructors

  • Outbound

    Travel in one direction (0)

  • Inbound

    Travel in opposite direction (1)

Drop-off type at a stop Source: GTFS reference.md - stop_times.txt > drop_off_type

pub type DropOffType {
  RegularDropOff
  NoDropOff
  PhoneForDropOff
  DriverCoordinatedDropOff
}

Constructors

  • RegularDropOff

    Regularly scheduled drop-off (0 or empty)

  • NoDropOff

    No drop-off available (1)

  • PhoneForDropOff

    Must phone agency to arrange drop-off (2)

  • DriverCoordinatedDropOff

    Must coordinate with driver for drop-off (3)

Duration limit type Source: GTFS reference.md - fare_transfer_rules.txt > duration_limit_type

pub type DurationLimitType {
  BetweenLegs
  BetweenStartTimes
  BetweenStartAndEnd
}

Constructors

  • BetweenLegs

    Between end of previous leg and start of next (0)

  • BetweenStartTimes

    Between start of previous leg and start of next (1)

  • BetweenStartAndEnd

    Between start of previous leg and end of next (2)

Exact times indicator for frequencies Source: GTFS reference.md - frequencies.txt > exact_times

pub type ExactTimes {
  FrequencyBased
  ScheduleBased
}

Constructors

  • FrequencyBased

    Frequency-based trips (0 or empty)

  • ScheduleBased

    Schedule-based trips with exact times (1)

Exception type for calendar dates Source: GTFS reference.md - calendar_dates.txt > exception_type

pub type ExceptionType {
  ServiceAdded
  ServiceRemoved
}

Constructors

  • ServiceAdded

    Service added for this date (1)

  • ServiceRemoved

    Service removed for this date (2)

Represents fare information from fare_attributes.txt

pub type FareAttribute {
  FareAttribute(
    fare_id: String,
    price: types.CurrencyAmount,
    currency_type: types.CurrencyCode,
    payment_method: PaymentMethod,
    transfers: TransferPolicy,
    agency_id: option.Option(String),
    transfer_duration: option.Option(Int),
  )
}

Constructors

  • FareAttribute(
      fare_id: String,
      price: types.CurrencyAmount,
      currency_type: types.CurrencyCode,
      payment_method: PaymentMethod,
      transfers: TransferPolicy,
      agency_id: option.Option(String),
      transfer_duration: option.Option(Int),
    )

    Arguments

    fare_id

    Unique identifier for the fare class. Required.

    price

    Fare price. Required.

    currency_type

    Currency code for the fare. Required.

    payment_method

    Payment method. Required.

    transfers

    Transfer policy. Required.

    agency_id

    Agency ID for the fare. Conditionally required.

    transfer_duration

    Transfer duration in seconds. Optional.

Represents a fare leg join rule from fare_leg_join_rules.txt Defines when two or more legs should be considered as a single effective fare leg for matching against fare_leg_rules.txt

pub type FareLegJoinRule {
  FareLegJoinRule(
    from_network_id: String,
    to_network_id: String,
    from_stop_id: option.Option(String),
    to_stop_id: option.Option(String),
  )
}

Constructors

  • FareLegJoinRule(
      from_network_id: String,
      to_network_id: String,
      from_stop_id: option.Option(String),
      to_stop_id: option.Option(String),
    )

    Arguments

    from_network_id

    Network ID for pre-transfer leg. Required.

    to_network_id

    Network ID for post-transfer leg. Required.

    from_stop_id

    Stop ID where pre-transfer leg ends. Conditionally required.

    to_stop_id

    Stop ID where post-transfer leg starts. Conditionally required.

Represents a fare leg rule from fare_leg_rules.txt

pub type FareLegRule {
  FareLegRule(
    leg_group_id: option.Option(String),
    network_id: option.Option(String),
    from_area_id: option.Option(String),
    to_area_id: option.Option(String),
    from_timeframe_group_id: option.Option(String),
    to_timeframe_group_id: option.Option(String),
    fare_product_id: String,
    rule_priority: option.Option(Int),
  )
}

Constructors

  • FareLegRule(
      leg_group_id: option.Option(String),
      network_id: option.Option(String),
      from_area_id: option.Option(String),
      to_area_id: option.Option(String),
      from_timeframe_group_id: option.Option(String),
      to_timeframe_group_id: option.Option(String),
      fare_product_id: String,
      rule_priority: option.Option(Int),
    )

    Arguments

    leg_group_id

    Leg group ID. Optional.

    network_id

    Network ID. Optional.

    from_area_id

    From area ID. Optional.

    to_area_id

    To area ID. Optional.

    from_timeframe_group_id

    From timeframe group ID. Optional.

    to_timeframe_group_id

    To timeframe group ID. Optional.

    fare_product_id

    Fare product ID. Required.

    rule_priority

    Rule priority. Optional.

Represents fare media from fare_media.txt

pub type FareMedia {
  FareMedia(
    fare_media_id: String,
    fare_media_name: option.Option(String),
    fare_media_type: FareMediaType,
  )
}

Constructors

  • FareMedia(
      fare_media_id: String,
      fare_media_name: option.Option(String),
      fare_media_type: FareMediaType,
    )

    Arguments

    fare_media_id

    Unique identifier. Required.

    fare_media_name

    Name of fare media. Optional.

    fare_media_type

    Type of fare media. Required.

Fare media type Source: GTFS reference.md - fare_media.txt > fare_media_type

pub type FareMediaType {
  NoFareMedia
  PaperTicket
  TransitCard
  Cemv
  MobileApp
}

Constructors

  • NoFareMedia

    None (0) - no fare media

  • PaperTicket

    Physical paper ticket (1)

  • TransitCard

    Transit card (2)

  • Cemv

    cEMV contactless (3)

  • MobileApp

    Mobile app (4)

Represents a fare product from fare_products.txt

pub type FareProduct {
  FareProduct(
    fare_product_id: String,
    fare_product_name: option.Option(String),
    fare_media_id: option.Option(String),
    amount: types.CurrencyAmount,
    currency: types.CurrencyCode,
  )
}

Constructors

  • FareProduct(
      fare_product_id: String,
      fare_product_name: option.Option(String),
      fare_media_id: option.Option(String),
      amount: types.CurrencyAmount,
      currency: types.CurrencyCode,
    )

    Arguments

    fare_product_id

    Unique identifier. Required.

    fare_product_name

    Name of fare product. Optional.

    fare_media_id

    Fare media ID. Optional.

    amount

    Amount. Required.

    currency

    Currency. Required.

Represents fare rules from fare_rules.txt

pub type FareRule {
  FareRule(
    fare_id: String,
    route_id: option.Option(String),
    origin_id: option.Option(String),
    destination_id: option.Option(String),
    contains_id: option.Option(String),
  )
}

Constructors

  • FareRule(
      fare_id: String,
      route_id: option.Option(String),
      origin_id: option.Option(String),
      destination_id: option.Option(String),
      contains_id: option.Option(String),
    )

    Arguments

    fare_id

    Fare ID. Required.

    route_id

    Route ID. Optional.

    origin_id

    Origin zone ID. Optional.

    destination_id

    Destination zone ID. Optional.

    contains_id

    Contains zone ID. Optional.

Represents a fare transfer rule from fare_transfer_rules.txt

pub type FareTransferRule {
  FareTransferRule(
    from_leg_group_id: option.Option(String),
    to_leg_group_id: option.Option(String),
    transfer_count: option.Option(Int),
    duration_limit: option.Option(Int),
    duration_limit_type: option.Option(DurationLimitType),
    fare_transfer_type: FareTransferType,
    fare_product_id: option.Option(String),
  )
}

Constructors

  • FareTransferRule(
      from_leg_group_id: option.Option(String),
      to_leg_group_id: option.Option(String),
      transfer_count: option.Option(Int),
      duration_limit: option.Option(Int),
      duration_limit_type: option.Option(DurationLimitType),
      fare_transfer_type: FareTransferType,
      fare_product_id: option.Option(String),
    )

    Arguments

    from_leg_group_id

    From leg group ID. Optional.

    to_leg_group_id

    To leg group ID. Optional.

    transfer_count

    Transfer count. Optional.

    duration_limit

    Duration limit. Optional.

    duration_limit_type

    Duration limit type. Optional.

    fare_transfer_type

    Fare transfer type. Required.

    fare_product_id

    Fare product ID. Optional.

Fare transfer type Source: GTFS reference.md - fare_transfer_rules.txt > fare_transfer_type

pub type FareTransferType {
  SumPlusTransfer
  SumPlusTransferCapped
  SumOfLegs
}

Constructors

  • SumPlusTransfer

    Transfer cost is sum of leg prices plus transfer price (0)

  • SumPlusTransferCapped

    Transfer cost is sum of leg prices plus transfer price, capped (1)

  • SumOfLegs

    Transfer cost is sum of leg prices (2)

Represents feed information from feed_info.txt

pub type FeedInfo {
  FeedInfo(
    feed_publisher_name: String,
    feed_publisher_url: types.Url,
    feed_lang: types.LanguageCode,
    default_lang: option.Option(types.LanguageCode),
    feed_start_date: option.Option(types.Date),
    feed_end_date: option.Option(types.Date),
    feed_version: option.Option(String),
    feed_contact_email: option.Option(types.Email),
    feed_contact_url: option.Option(types.Url),
  )
}

Constructors

Represents a frequency-based trip from frequencies.txt

pub type Frequency {
  Frequency(
    trip_id: String,
    start_time: types.Time,
    end_time: types.Time,
    headway_secs: Int,
    exact_times: ExactTimes,
  )
}

Constructors

  • Frequency(
      trip_id: String,
      start_time: types.Time,
      end_time: types.Time,
      headway_secs: Int,
      exact_times: ExactTimes,
    )

    Arguments

    trip_id

    Trip ID. Required.

    start_time

    Start time. Required.

    end_time

    End time. Required.

    headway_secs

    Headway in seconds. Required.

    exact_times

    Exact times indicator. Optional.

A GeoJSON feature representing a flex zone

pub type GeoJsonFeature {
  GeoJsonFeature(
    id: String,
    properties: GeoJsonProperties,
    geometry: GeoJsonGeometry,
  )
}

Constructors

  • GeoJsonFeature(
      id: String,
      properties: GeoJsonProperties,
      geometry: GeoJsonGeometry,
    )

    Arguments

    id

    Unique identifier. Required.

    properties

    Properties. Required.

    geometry

    Geometry. Required.

GeoJSON geometry types

pub type GeoJsonGeometry {
  Polygon(rings: List(List(types.Coordinate)))
  MultiPolygon(polygons: List(List(List(types.Coordinate))))
}

Constructors

  • Polygon(rings: List(List(types.Coordinate)))

    A single polygon with exterior ring and optional holes

  • MultiPolygon(polygons: List(List(List(types.Coordinate))))

    Multiple polygons

GeoJSON feature properties

pub type GeoJsonProperties {
  GeoJsonProperties(
    stop_name: option.Option(String),
    stop_desc: option.Option(String),
  )
}

Constructors

  • GeoJsonProperties(
      stop_name: option.Option(String),
      stop_desc: option.Option(String),
    )

    Arguments

    stop_name

    Stop name. Optional.

    stop_desc

    Stop description. Optional.

Represents a level from levels.txt

pub type Level {
  Level(
    level_id: String,
    level_index: Float,
    level_name: option.Option(String),
  )
}

Constructors

  • Level(
      level_id: String,
      level_index: Float,
      level_name: option.Option(String),
    )

    Arguments

    level_id

    Unique identifier for the level. Required.

    level_index

    Level index (numeric, relative to street). Required.

    level_name

    Level name. Optional.

Represents a location group from location_groups.txt

pub type LocationGroup {
  LocationGroup(
    location_group_id: String,
    location_group_name: option.Option(String),
  )
}

Constructors

  • LocationGroup(
      location_group_id: String,
      location_group_name: option.Option(String),
    )

    Arguments

    location_group_id

    Unique identifier. Required.

    location_group_name

    Name. Optional.

Represents a location group stop from location_group_stops.txt

pub type LocationGroupStop {
  LocationGroupStop(location_group_id: String, stop_id: String)
}

Constructors

  • LocationGroupStop(location_group_id: String, stop_id: String)

    Arguments

    location_group_id

    Location group ID. Required.

    stop_id

    Stop ID. Required.

Location type enum for stops Source: GTFS reference.md - stops.txt > location_type

pub type LocationType {
  StopOrPlatform
  Station
  EntranceExit
  GenericNode
  BoardingArea
}

Constructors

  • StopOrPlatform

    Stop or platform where passengers board/alight (0 or empty)

  • Station

    Station containing one or more platforms (1)

  • EntranceExit

    Entrance/exit from street to station (2)

  • GenericNode

    Generic node for pathway connections (3)

  • BoardingArea

    Specific boarding location on a platform (4)

Represents the locations.geojson file content

pub type LocationsGeoJson {
  LocationsGeoJson(features: List(GeoJsonFeature))
}

Constructors

Represents a network from networks.txt

pub type Network {
  Network(
    network_id: String,
    network_name: option.Option(String),
  )
}

Constructors

  • Network(network_id: String, network_name: option.Option(String))

    Arguments

    network_id

    Unique identifier for the network. Required.

    network_name

    Network name. Optional.

Represents a pathway from pathways.txt

pub type Pathway {
  Pathway(
    pathway_id: String,
    from_stop_id: String,
    to_stop_id: String,
    pathway_mode: PathwayMode,
    is_bidirectional: Bool,
    length: option.Option(Float),
    traversal_time: option.Option(Int),
    stair_count: option.Option(Int),
    max_slope: option.Option(Float),
    min_width: option.Option(Float),
    signposted_as: option.Option(String),
    reversed_signposted_as: option.Option(String),
  )
}

Constructors

  • Pathway(
      pathway_id: String,
      from_stop_id: String,
      to_stop_id: String,
      pathway_mode: PathwayMode,
      is_bidirectional: Bool,
      length: option.Option(Float),
      traversal_time: option.Option(Int),
      stair_count: option.Option(Int),
      max_slope: option.Option(Float),
      min_width: option.Option(Float),
      signposted_as: option.Option(String),
      reversed_signposted_as: option.Option(String),
    )

    Arguments

    pathway_id

    Unique identifier for the pathway. Required.

    from_stop_id

    Origin location. Required.

    to_stop_id

    Destination location. Required.

    pathway_mode

    Pathway type. Required.

    is_bidirectional

    Bidirectional indicator. Required.

    length

    Length in meters. Optional.

    traversal_time

    Traversal time in seconds. Optional.

    stair_count

    Stair count. Optional.

    max_slope

    Maximum slope. Optional.

    min_width

    Minimum width in meters. Optional.

    signposted_as

    Signposted as. Optional.

    reversed_signposted_as

    Reversed signposted as. Optional.

Pathway mode Source: GTFS reference.md - pathways.txt > pathway_mode

pub type PathwayMode {
  Walkway
  Stairs
  MovingSidewalk
  Escalator
  Elevator
  FareGate
  ExitGate
}

Constructors

  • Walkway

    Walkway (1)

  • Stairs

    Stairs (2)

  • MovingSidewalk

    Moving sidewalk/travelator (3)

  • Escalator

    Escalator (4)

  • Elevator

    Elevator (5)

  • FareGate

    Fare gate (6)

  • ExitGate

    Exit gate (7)

Payment method for fares Source: GTFS reference.md - fare_attributes.txt > payment_method

pub type PaymentMethod {
  PayOnBoard
  PayBeforeBoarding
}

Constructors

  • PayOnBoard

    Fare paid on board (0)

  • PayBeforeBoarding

    Fare must be paid before boarding (1)

Pickup type at a stop Source: GTFS reference.md - stop_times.txt > pickup_type

pub type PickupType {
  RegularPickup
  NoPickup
  PhoneForPickup
  DriverCoordinatedPickup
}

Constructors

  • RegularPickup

    Regularly scheduled pickup (0 or empty)

  • NoPickup

    No pickup available (1)

  • PhoneForPickup

    Must phone agency to arrange pickup (2)

  • DriverCoordinatedPickup

    Must coordinate with driver for pickup (3)

Represents a rider category from rider_categories.txt

pub type RiderCategory {
  RiderCategory(
    rider_category_id: String,
    rider_category_name: String,
    min_age: option.Option(Int),
    max_age: option.Option(Int),
    eligibility_url: option.Option(String),
  )
}

Constructors

  • RiderCategory(
      rider_category_id: String,
      rider_category_name: String,
      min_age: option.Option(Int),
      max_age: option.Option(Int),
      eligibility_url: option.Option(String),
    )

    Arguments

    rider_category_id

    Unique identifier for the rider category. Required.

    rider_category_name

    Name of the rider category. Required.

    min_age

    Minimum age for this category. Optional.

    max_age

    Maximum age for this category. Optional.

    eligibility_url

    URL with eligibility requirements. Optional.

Represents a transit route from routes.txt

pub type Route {
  Route(
    route_id: String,
    agency_id: option.Option(String),
    route_short_name: option.Option(String),
    route_long_name: option.Option(String),
    route_desc: option.Option(String),
    route_type: RouteType,
    route_url: option.Option(types.Url),
    route_color: option.Option(types.Color),
    route_text_color: option.Option(types.Color),
    route_sort_order: option.Option(Int),
    continuous_pickup: ContinuousPickup,
    continuous_drop_off: ContinuousDropOff,
    network_id: option.Option(String),
  )
}

Constructors

  • Route(
      route_id: String,
      agency_id: option.Option(String),
      route_short_name: option.Option(String),
      route_long_name: option.Option(String),
      route_desc: option.Option(String),
      route_type: RouteType,
      route_url: option.Option(types.Url),
      route_color: option.Option(types.Color),
      route_text_color: option.Option(types.Color),
      route_sort_order: option.Option(Int),
      continuous_pickup: ContinuousPickup,
      continuous_drop_off: ContinuousDropOff,
      network_id: option.Option(String),
    )

    Arguments

    route_id

    Unique identifier for the route. Required.

    agency_id

    Agency operating the route. Conditionally required.

    route_short_name

    Short name of the route. Conditionally required.

    route_long_name

    Full name of the route. Conditionally required.

    route_desc

    Description of the route. Optional.

    route_type

    Type of transportation used. Required.

    route_url

    URL of a web page about the route. Optional.

    route_color

    Route color for display. Optional.

    route_text_color

    Text color for route labels. Optional.

    route_sort_order

    Order for sorting routes. Optional.

    continuous_pickup

    Continuous pickup behavior. Optional.

    continuous_drop_off

    Continuous drop-off behavior. Optional.

    network_id

    Network ID for fare calculations. Optional.

Represents a route-network assignment from route_networks.txt

pub type RouteNetwork {
  RouteNetwork(network_id: String, route_id: String)
}

Constructors

  • RouteNetwork(network_id: String, route_id: String)

    Arguments

    network_id

    Network ID. Required.

    route_id

    Route ID. Required.

Route type enum indicating mode of transportation Source: GTFS reference.md - routes.txt > route_type

pub type RouteType {
  Tram
  Subway
  Rail
  Bus
  Ferry
  CableTram
  AerialLift
  Funicular
  Trolleybus
  Monorail
  Extended(Int)
}

Constructors

  • Tram

    Tram, Streetcar, Light rail (0)

  • Subway

    Subway, Metro (1)

  • Rail

    Rail, Intercity/long-distance (2)

  • Bus

    Bus (3)

  • Ferry

    Ferry (4)

  • CableTram

    Cable tram (5) - e.g., San Francisco cable car

  • AerialLift

    Aerial lift, gondola, aerial tramway (6)

  • Funicular

    Funicular (7)

  • Trolleybus

    Trolleybus (11)

  • Monorail

    Monorail (12)

  • Extended(Int)

    Extended route type (100-1799)

    Supports the Google Transit Extended Route Types specification for more granular vehicle type classifications (e.g., 100-117 for railway services, 200-209 for coach, 400-405 for urban railway, 700-717 for bus services, etc.).

    See: https://developers.google.com/transit/gtfs/reference/extended-route-types

Represents a shape point from shapes.txt

pub type ShapePoint {
  ShapePoint(
    shape_id: String,
    shape_pt_lat: Float,
    shape_pt_lon: Float,
    shape_pt_sequence: Int,
    shape_dist_traveled: option.Option(Float),
  )
}

Constructors

  • ShapePoint(
      shape_id: String,
      shape_pt_lat: Float,
      shape_pt_lon: Float,
      shape_pt_sequence: Int,
      shape_dist_traveled: option.Option(Float),
    )

    Arguments

    shape_id

    Shape ID. Required.

    shape_pt_lat

    Latitude of shape point. Required.

    shape_pt_lon

    Longitude of shape point. Required.

    shape_pt_sequence

    Sequence of shape point. Required.

    shape_dist_traveled

    Distance traveled. Optional.

Represents a stop, station, or other location from stops.txt

pub type Stop {
  Stop(
    stop_id: String,
    stop_code: option.Option(String),
    stop_name: option.Option(String),
    tts_stop_name: option.Option(String),
    stop_desc: option.Option(String),
    stop_lat: option.Option(Float),
    stop_lon: option.Option(Float),
    zone_id: option.Option(String),
    stop_url: option.Option(types.Url),
    location_type: LocationType,
    parent_station: option.Option(String),
    stop_timezone: option.Option(types.Timezone),
    wheelchair_boarding: WheelchairBoarding,
    level_id: option.Option(String),
    platform_code: option.Option(String),
    stop_access: option.Option(StopAccess),
  )
}

Constructors

  • Stop(
      stop_id: String,
      stop_code: option.Option(String),
      stop_name: option.Option(String),
      tts_stop_name: option.Option(String),
      stop_desc: option.Option(String),
      stop_lat: option.Option(Float),
      stop_lon: option.Option(Float),
      zone_id: option.Option(String),
      stop_url: option.Option(types.Url),
      location_type: LocationType,
      parent_station: option.Option(String),
      stop_timezone: option.Option(types.Timezone),
      wheelchair_boarding: WheelchairBoarding,
      level_id: option.Option(String),
      platform_code: option.Option(String),
      stop_access: option.Option(StopAccess),
    )

    Arguments

    stop_id

    Unique identifier for the stop. Required.

    stop_code

    Short text or number identifying the stop for riders. Optional.

    stop_name

    Name of the stop. Conditionally required.

    tts_stop_name

    Text-to-speech pronunciation of the stop name. Optional.

    stop_desc

    Description of the stop. Optional.

    stop_lat

    Latitude of the stop. Conditionally required.

    stop_lon

    Longitude of the stop. Conditionally required.

    zone_id

    Fare zone ID. Optional.

    stop_url

    URL of a web page about the stop. Optional.

    location_type

    Type of location. Optional (default: StopOrPlatform).

    parent_station

    Parent station ID. Conditionally required.

    stop_timezone

    Timezone of the stop. Optional.

    wheelchair_boarding

    Wheelchair boarding accessibility. Optional.

    level_id

    Level ID for multi-level stations. Optional.

    platform_code

    Platform identifier. Optional.

    stop_access

    Stop access indicator for pathway stations. Conditionally Forbidden.

Stop access indicator (for pathway stations) Source: GTFS reference.md - stops.txt > stop_access Conditionally Forbidden for stations, entrances, generic nodes, boarding areas

pub type StopAccess {
  MustUsePathways
  DirectStreetAccess
}

Constructors

  • MustUsePathways

    Must use entrance/pathways (0)

  • DirectStreetAccess

    Direct access from street (1)

Represents a stop-area assignment from stop_areas.txt

pub type StopArea {
  StopArea(area_id: String, stop_id: String)
}

Constructors

  • StopArea(area_id: String, stop_id: String)

    Arguments

    area_id

    Area ID. Required.

    stop_id

    Stop ID. Required.

Represents a stop time from stop_times.txt

pub type StopTime {
  StopTime(
    trip_id: String,
    arrival_time: option.Option(types.Time),
    departure_time: option.Option(types.Time),
    stop_id: option.Option(String),
    location_group_id: option.Option(String),
    location_id: option.Option(String),
    stop_sequence: Int,
    stop_headsign: option.Option(String),
    start_pickup_drop_off_window: option.Option(types.Time),
    end_pickup_drop_off_window: option.Option(types.Time),
    pickup_type: PickupType,
    drop_off_type: DropOffType,
    continuous_pickup: ContinuousPickup,
    continuous_drop_off: ContinuousDropOff,
    shape_dist_traveled: option.Option(Float),
    timepoint: Timepoint,
    pickup_booking_rule_id: option.Option(String),
    drop_off_booking_rule_id: option.Option(String),
  )
}

Constructors

  • StopTime(
      trip_id: String,
      arrival_time: option.Option(types.Time),
      departure_time: option.Option(types.Time),
      stop_id: option.Option(String),
      location_group_id: option.Option(String),
      location_id: option.Option(String),
      stop_sequence: Int,
      stop_headsign: option.Option(String),
      start_pickup_drop_off_window: option.Option(types.Time),
      end_pickup_drop_off_window: option.Option(types.Time),
      pickup_type: PickupType,
      drop_off_type: DropOffType,
      continuous_pickup: ContinuousPickup,
      continuous_drop_off: ContinuousDropOff,
      shape_dist_traveled: option.Option(Float),
      timepoint: Timepoint,
      pickup_booking_rule_id: option.Option(String),
      drop_off_booking_rule_id: option.Option(String),
    )

    Arguments

    trip_id

    Trip ID. Required.

    arrival_time

    Arrival time at the stop. Conditionally required.

    departure_time

    Departure time from the stop. Conditionally required.

    stop_id

    Stop ID. Conditionally required.

    location_group_id

    Location group ID for flex service. Conditionally forbidden.

    location_id

    Location ID referencing locations.geojson. Conditionally forbidden.

    stop_sequence

    Order of stops for the trip. Required.

    stop_headsign

    Headsign text for this stop. Optional.

    start_pickup_drop_off_window

    Start of pickup/drop-off window (flex). Conditionally required.

    end_pickup_drop_off_window

    End of pickup/drop-off window (flex). Conditionally required.

    pickup_type

    Pickup type at this stop. Conditionally forbidden.

    drop_off_type

    Drop-off type at this stop. Conditionally forbidden.

    continuous_pickup

    Continuous pickup behavior. Conditionally forbidden.

    continuous_drop_off

    Continuous drop-off behavior. Conditionally forbidden.

    shape_dist_traveled

    Distance traveled from first stop. Optional.

    timepoint

    Timepoint indicator. Optional.

    pickup_booking_rule_id

    Booking rule for pickup (flex). Optional.

    drop_off_booking_rule_id

    Booking rule for drop-off (flex). Optional.

Table names that can be translated Source: GTFS reference.md - translations.txt > table_name

pub type TableName {
  AgencyTable
  StopsTable
  RoutesTable
  TripsTable
  StopTimesTable
  PathwaysTable
  LevelsTable
  FeedInfoTable
  AttributionsTable
}

Constructors

  • AgencyTable
  • StopsTable
  • RoutesTable
  • TripsTable
  • StopTimesTable
  • PathwaysTable
  • LevelsTable
  • FeedInfoTable
  • AttributionsTable

Represents a timeframe from timeframes.txt

pub type Timeframe {
  Timeframe(
    timeframe_group_id: String,
    start_time: option.Option(types.Time),
    end_time: option.Option(types.Time),
    service_id: String,
  )
}

Constructors

  • Timeframe(
      timeframe_group_id: String,
      start_time: option.Option(types.Time),
      end_time: option.Option(types.Time),
      service_id: String,
    )

    Arguments

    timeframe_group_id

    Timeframe group ID. Required.

    start_time

    Start time. Conditionally required.

    end_time

    End time. Conditionally required.

    service_id

    Service ID. Required.

Timepoint indicator Source: GTFS reference.md - stop_times.txt > timepoint

pub type Timepoint {
  Approximate
  Exact
}

Constructors

  • Approximate

    Times are approximate (0)

  • Exact

    Times are exact (1 or empty)

Represents a transfer rule from transfers.txt

pub type Transfer {
  Transfer(
    from_stop_id: option.Option(String),
    to_stop_id: option.Option(String),
    from_route_id: option.Option(String),
    to_route_id: option.Option(String),
    from_trip_id: option.Option(String),
    to_trip_id: option.Option(String),
    transfer_type: TransferType,
    min_transfer_time: option.Option(Int),
  )
}

Constructors

  • Transfer(
      from_stop_id: option.Option(String),
      to_stop_id: option.Option(String),
      from_route_id: option.Option(String),
      to_route_id: option.Option(String),
      from_trip_id: option.Option(String),
      to_trip_id: option.Option(String),
      transfer_type: TransferType,
      min_transfer_time: option.Option(Int),
    )

    Arguments

    from_stop_id

    Origin stop ID. Conditionally required.

    to_stop_id

    Destination stop ID. Conditionally required.

    from_route_id

    Origin route ID. Optional.

    to_route_id

    Destination route ID. Optional.

    from_trip_id

    Origin trip ID. Conditionally required.

    to_trip_id

    Destination trip ID. Conditionally required.

    transfer_type

    Transfer type. Required.

    min_transfer_time

    Minimum transfer time in seconds. Optional.

Transfer policy for fares Source: GTFS reference.md - fare_attributes.txt > transfers

pub type TransferPolicy {
  NoTransfers
  OneTransfer
  TwoTransfers
  UnlimitedTransfers
}

Constructors

  • NoTransfers

    No transfers permitted (0)

  • OneTransfer

    One transfer permitted (1)

  • TwoTransfers

    Two transfers permitted (2)

  • UnlimitedTransfers

    Unlimited transfers (empty or omitted)

Transfer type Source: GTFS reference.md - transfers.txt > transfer_type

pub type TransferType {
  RecommendedTransfer
  TimedTransfer
  MinimumTimeTransfer
  NoTransfer
  InSeatTransfer
  ReBoardTransfer
}

Constructors

  • RecommendedTransfer

    Recommended transfer point (0 or empty)

  • TimedTransfer

    Timed transfer (1)

  • MinimumTimeTransfer

    Minimum time required (2)

  • NoTransfer

    Transfer not possible (3)

  • InSeatTransfer

    In-seat transfer (4)

  • ReBoardTransfer

    Re-board same vehicle (5)

Represents a translation from translations.txt

pub type Translation {
  Translation(
    table_name: TableName,
    field_name: String,
    language: types.LanguageCode,
    translation: String,
    record_id: option.Option(String),
    record_sub_id: option.Option(String),
    field_value: option.Option(String),
  )
}

Constructors

  • Translation(
      table_name: TableName,
      field_name: String,
      language: types.LanguageCode,
      translation: String,
      record_id: option.Option(String),
      record_sub_id: option.Option(String),
      field_value: option.Option(String),
    )

    Arguments

    table_name

    Table name containing field to translate. Required.

    field_name

    Field name to translate. Required.

    language

    Language code of translation. Required.

    translation

    Translated value. Required.

    record_id

    Record ID. Conditionally required.

    record_sub_id

    Record sub ID. Conditionally required.

    field_value

    Field value to translate. Conditionally required.

Represents a trip from trips.txt

pub type Trip {
  Trip(
    route_id: String,
    service_id: String,
    trip_id: String,
    trip_headsign: option.Option(String),
    trip_short_name: option.Option(String),
    direction_id: option.Option(DirectionId),
    block_id: option.Option(String),
    shape_id: option.Option(String),
    wheelchair_accessible: WheelchairAccessible,
    bikes_allowed: BikesAllowed,
  )
}

Constructors

  • Trip(
      route_id: String,
      service_id: String,
      trip_id: String,
      trip_headsign: option.Option(String),
      trip_short_name: option.Option(String),
      direction_id: option.Option(DirectionId),
      block_id: option.Option(String),
      shape_id: option.Option(String),
      wheelchair_accessible: WheelchairAccessible,
      bikes_allowed: BikesAllowed,
    )

    Arguments

    route_id

    Route ID for this trip. Required.

    service_id

    Service ID defining when trip runs. Required.

    trip_id

    Unique identifier for the trip. Required.

    trip_headsign

    Text that appears on signage. Optional.

    trip_short_name

    Short name for schedules. Optional.

    direction_id

    Direction of travel. Optional.

    block_id

    Block ID for linking trips. Optional.

    shape_id

    Shape ID for the trip path. Optional.

    wheelchair_accessible

    Wheelchair accessibility. Optional.

    bikes_allowed

    Bikes allowed indicator. Optional.

Wheelchair accessibility for a trip Source: GTFS reference.md - trips.txt > wheelchair_accessible

pub type WheelchairAccessible {
  NoAccessibilityInfo
  AccessibleVehicle
  NotAccessibleVehicle
}

Constructors

  • NoAccessibilityInfo

    No accessibility information (0 or empty)

  • AccessibleVehicle

    Vehicle can accommodate at least one wheelchair (1)

  • NotAccessibleVehicle

    No wheelchairs can be accommodated (2)

Wheelchair boarding accessibility indicator Source: GTFS reference.md - stops.txt > wheelchair_boarding

pub type WheelchairBoarding {
  NoWheelchairInfo
  WheelchairAccessible
  NotWheelchairAccessible
}

Constructors

  • NoWheelchairInfo

    No accessibility information (0 or empty)

  • WheelchairAccessible

    Some vehicles/stop is wheelchair accessible (1)

  • NotWheelchairAccessible

    Wheelchair boarding not possible (2)

Search Document