s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
103 lines • 5.41 kB
TypeScript
import { GTFSRealtimeOccupancyStatus, GTFSRealtimeStopTimeEvent } from '..';
import type { Pbf as Protobuf } from '../../..';
/** The relation between the StopTimeEvents and the static schedule. */
export declare enum GTFSRealtimeScheduleRelationshipUpdate {
/**
* The vehicle is proceeding in accordance with its static schedule of
* stops, although not necessarily according to the times of the schedule.
* At least one of arrival and departure must be provided. If the schedule
* for this stop contains both arrival and departure times then so must
* this update. Frequency-based trips (GTFS frequencies.txt with exact_times = 0)
* should not have a SCHEDULED value and should use UNSCHEDULED instead.
*/
SCHEDULED = 0,
/**
* The stop is skipped, i.e., the vehicle will not stop at this stop.
* Arrival and departure are optional.
*/
SKIPPED = 1,
/**
* No StopTimeEvents are given for this stop.
* The main intention for this value is to give time predictions only for
* part of a trip, i.e., if the last update for a trip has a NO_DATA
* specifier, then StopTimeEvents for the rest of the stops in the trip
* are considered to be unspecified as well.
* Neither arrival nor departure should be supplied.
*/
NO_DATA = 2,
/**
* The vehicle is operating a trip defined in GTFS frequencies.txt with exact_times = 0.
* This value should not be used for trips that are not defined in GTFS frequencies.txt,
* or trips in GTFS frequencies.txt with exact_times = 1. Trips containing StopTimeUpdates
* with ScheduleRelationship=UNSCHEDULED must also set TripDescriptor.ScheduleRelationship=UNSCHEDULED.
* NOTE: This field is still experimental, and subject to change. It may be
* formally adopted in the future.
*/
UNSCHEDULED = 3
}
/**
* Realtime update for arrival and/or departure events for a given stop on a
* trip. Updates can be supplied for both past and future events.
* The producer is allowed, although not required, to drop past events.
*
* The update is linked to a specific stop either through stop_sequence or
* stop_id, so one of the fields below must necessarily be set.
* See the documentation in TripDescriptor for more information.
*/
export declare class GTFSRealtimeStopTimeUpdate {
#private;
/** Must be the same as in stop_times.txt in the corresponding GTFS feed. */
stopSequence?: number;
arrival?: GTFSRealtimeStopTimeEvent;
departure?: GTFSRealtimeStopTimeEvent;
/** Must be the same as in stops.txt in the corresponding GTFS feed. */
stopId?: string;
/** The relation between the StopTimeEvents and the static schedule. */
scheduleRelationship: GTFSRealtimeScheduleRelationshipUpdate;
/**
* Realtime updates for certain properties defined within GTFS stop_times.txt
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*/
stopTimeProperties?: GTFSRealtimeStopTimeProperties;
/**
* Expected occupancy after departure from the given stop.
* Should be provided only for future stops.
* In order to provide departure_occupancy_status without either arrival or
* departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
*/
departureOccupancyStatus?: GTFSRealtimeOccupancyStatus;
/**
* @param pbf - The Protobuf object to read from
* @param end - The end position of the message in the buffer
*/
constructor(pbf: Protobuf, end: number);
}
/**
* Provides the updated values for the stop time.
* NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
*/
export declare class GTFSRealtimeStopTimeProperties {
#private;
/**
* Supports real-time stop assignments. Refers to a stop_id defined in the GTFS stops.txt.
* The new assigned_stop_id should not result in a significantly different trip experience for the end user than
* the stop_id defined in GTFS stop_times.txt. In other words, the end user should not view this new stop_id as an
* "unusual change" if the new stop was presented within an app without any additional context.
* For example, this field is intended to be used for platform assignments by using a stop_id that belongs to the
* same station as the stop originally defined in GTFS stop_times.txt.
* To assign a stop without providing any real-time arrival or departure predictions, populate this field and set
* StopTimeUpdate.schedule_relationship = NO_DATA.
* If this field is populated, it is preferred to omit `StopTimeUpdate.stop_id` and use only `StopTimeUpdate.stop_sequence`. If
* `StopTimeProperties.assigned_stop_id` and `StopTimeUpdate.stop_id` are populated, `StopTimeUpdate.stop_id` must match `assigned_stop_id`.
* Platform assignments should be reflected in other GTFS-realtime fields as well
* (e.g., `VehiclePosition.stop_id`).
* NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
*/
assignedStopId?: string;
/**
* @param pbf - The Protobuf object to read from
* @param end - The end position of the message in the buffer
*/
constructor(pbf: Protobuf, end: number);
}
//# sourceMappingURL=update.d.ts.map