s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
224 lines • 10.3 kB
TypeScript
import { GTFSRealtimePosition, GTFSRealtimeTripDescriptor } from './..';
import type { Pbf as Protobuf } from '../..';
/** Status of the vehicle relative to the stop */
export declare enum VehicleStopStatus {
/**
* The vehicle is just about to arrive at the stop (on a stop
* display, the vehicle symbol typically flashes).
*/
INCOMING_AT = 0,
/** The vehicle is standing at the stop. */
STOPPED_AT = 1,
/** The vehicle has departed and is in transit to the next stop. */
IN_TRANSIT_TO = 2
}
/** Congestion level that is affecting this vehicle. */
export declare enum GTFSRealtimeCongestionLevel {
UNKNOWN_CONGESTION_LEVEL = 0,
RUNNING_SMOOTHLY = 1,
STOP_AND_GO = 2,
CONGESTION = 3,
SEVERE_CONGESTION = 4
}
/**
* The state of passenger occupancy for the vehicle or carriage.
* Individual producers may not publish all OccupancyStatus values. Therefore, consumers
* must not assume that the OccupancyStatus values follow a linear scale.
* Consumers should represent OccupancyStatus values as the state indicated
* and intended by the producer. Likewise, producers must use OccupancyStatus values that
* correspond to actual vehicle occupancy states.
* For describing passenger occupancy levels on a linear scale, see `occupancy_percentage`.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*/
export declare enum GTFSRealtimeOccupancyStatus {
/**
* The vehicle or carriage is considered empty by most measures, and has few or no
* passengers onboard, but is still accepting passengers.
*/
EMPTY = 0,
/**
* The vehicle or carriage has a large number of seats available.
* The amount of free seats out of the total seats available to be
* considered large enough to fall into this category is determined at the
* discretion of the producer.
*/
MANY_SEATS_AVAILABLE = 1,
/**
* The vehicle or carriage has a relatively small number of seats available.
* The amount of free seats out of the total seats available to be
* considered small enough to fall into this category is determined at the
* discretion of the feed producer.
*/
FEW_SEATS_AVAILABLE = 2,
/** The vehicle or carriage can currently accommodate only standing passengers. */
STANDING_ROOM_ONLY = 3,
/**
* The vehicle or carriage can currently accommodate only standing passengers
* and has limited space for them.
*/
CRUSHED_STANDING_ROOM_ONLY = 4,
/**
* The vehicle or carriage is considered full by most measures, but may still be
* allowing passengers to board.
*/
FULL = 5,
/** The vehicle or carriage is not accepting passengers, but usually accepts passengers for boarding. */
NOT_ACCEPTING_PASSENGERS = 6,
/** The vehicle or carriage doesn't have any occupancy data available at that time. */
NO_DATA_AVAILABLE = 7,
/**
* The vehicle or carriage is not boardable and never accepts passengers.
* Useful for special vehicles or carriages (engine, maintenance carriage, etc.).
*/
NOT_BOARDABLE = 8
}
/** Realtime positioning information for a given vehicle. */
export declare class GTFSRealtimeVehiclePosition {
#private;
/**
* The Trip that this vehicle is serving.
* Can be empty or partial if the vehicle can not be identified with a given
* trip instance.
*/
trip?: GTFSRealtimeTripDescriptor;
/** Current position of this vehicle. */
position: GTFSRealtimePosition;
/**
* The stop sequence index of the current stop. The meaning of
* current_stop_sequence (i.e., the stop that it refers to) is determined by
* current_status.
* If current_status is missing IN_TRANSIT_TO is assumed.
*/
currentStopSequence?: number;
/**
* The exact status of the vehicle with respect to the current stop.
* Ignored if current_stop_sequence is missing.
*/
currentStatus: VehicleStopStatus;
/**
* Moment at which the vehicle's position was measured. In POSIX time
* (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
*/
timestamp?: Date;
/** Congestion level that is affecting this vehicle. */
congestionLevel?: GTFSRealtimeCongestionLevel;
/**
* Identifies the current stop. The value must be the same as in stops.txt in
* the corresponding GTFS feed.
*/
stopId?: string;
/** Additional information on the vehicle that is serving this trip. */
vehicle?: GTFSRealtimeVehicleDescriptor;
/**
* If multi_carriage_status is populated with per-carriage OccupancyStatus,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
*/
occupancyStatus?: GTFSRealtimeOccupancyStatus;
/**
* A percentage value indicating the degree of passenger occupancy in the vehicle.
* The values are represented as an integer without decimals. 0 means 0% and 100 means 100%.
* The value 100 should represent the total maximum occupancy the vehicle was designed for,
* including both seated and standing capacity, and current operating regulations allow.
* The value may exceed 100 if there are more passengers than the maximum designed capacity.
* The precision of occupancy_percentage should be low enough that individual passengers cannot be tracked boarding or alighting the vehicle.
* If multi_carriage_status is populated with per-carriage occupancy_percentage,
* then this field should describe the entire vehicle with all carriages accepting passengers considered.
* This field is still experimental, and subject to change. It may be formally adopted in the future.
*/
occupancyPercentage?: number;
/**
* Details of the multiple carriages of this given vehicle.
* The first occurrence represents the first carriage of the vehicle,
* given the current direction of travel.
* The number of occurrences of the multi_carriage_details
* field represents the number of carriages of the vehicle.
* It also includes non boardable carriages,
* like engines, maintenance carriages, etc… as they provide valuable
* information to passengers about where to stand on a platform.
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*/
multiCarriageDetails: GTFSRealtimeMultiCarriageDetails[];
/**
* @param pbf - The Protobuf object to read from
* @param end - The end position of the message in the buffer
*/
constructor(pbf: Protobuf, end: number);
}
/** Wheelchair accessibility of the trip */
export declare enum GTFSRealtimeWheelchairAccessible {
NO_VALUE = 0,
UNKNOWN = 1,
WHEELCHAIR_ACCESSIBLE = 2,
WHEELCHAIR_INACCESSIBLE = 3
}
/** Identification information for the vehicle performing the trip. */
export declare class GTFSRealtimeVehicleDescriptor {
#private;
/**
* Internal system identification of the vehicle. Should be unique per
* vehicle, and can be used for tracking the vehicle as it proceeds through
* the system.
*/
id?: string;
/**
* User visible label, i.e., something that must be shown to the passenger to
* help identify the correct vehicle.
*/
label?: string;
/** The license plate of the vehicle. */
licensePlate?: string;
/** Wheelchair accessibility of the trip */
wheelchairAccessible: GTFSRealtimeWheelchairAccessible;
/**
* @param pbf - The Protobuf object to read from
* @param end - The end position of the message in the buffer
*/
constructor(pbf: Protobuf, end: number);
}
/**
* Carriage specific details, used for vehicles composed of several carriages
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*/
export declare class GTFSRealtimeMultiCarriageDetails {
#private;
/** Identification of the carriage. Should be unique per vehicle. */
id?: string;
/**
* User visible label that may be shown to the passenger to help identify
* the carriage. Example: "7712", "Car ABC-32", etc...
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*/
label?: string;
/**
* Occupancy status for this given carriage, in this vehicle
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*/
occupancyStatus: GTFSRealtimeOccupancyStatus;
/**
* Occupancy percentage for this given carriage, in this vehicle.
* Follows the same rules as "VehiclePosition.occupancy_percentage"
* -1 in case data is not available for this given carriage (as protobuf defaults to 0 otherwise)
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*/
occupancyPercentage: number;
/**
* Identifies the order of this carriage with respect to the other
* carriages in the vehicle's list of CarriageDetails.
* The first carriage in the direction of travel must have a value of 1.
* The second value corresponds to the second carriage in the direction
* of travel and must have a value of 2, and so forth.
* For example, the first carriage in the direction of travel has a value of 1.
* If the second carriage in the direction of travel has a value of 3,
* consumers will discard data for all carriages (i.e., the multi_carriage_details field).
* Carriages without data must be represented with a valid carriage_sequence number and the fields
* without data should be omitted (alternately, those fields could also be included and set to the "no data" values).
* This message/field is still experimental, and subject to change. It may be formally adopted in the future.
*/
carriageSequence?: number;
/**
* @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=vehiclePosition.d.ts.map