summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2026-03-15 22:13:31 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2026-03-15 22:13:31 +0100
commitcb712dc2a9f3d4ce0cf94fded321de4138f063d9 (patch)
tree4610ffe4862bd36010b9780483267ea9f7a2205a
parent889e1ccfdd54d3e68982b9c48d0e324750fce002 (diff)
Remove renfe RT proxying, add Xunta feed, update script
-rw-r--r--.gitmodules3
-rw-r--r--README.md9
-rw-r--r--Taskfile.yml12
m---------build_renfe0
m---------build_xunta0
-rw-r--r--proxy_rt_renfe/gtfsrt.proto1259
-rw-r--r--proxy_rt_renfe/gtfsrt_pb2.py117
-rw-r--r--proxy_rt_renfe/gtfsrt_pb2.pyi577
-rw-r--r--proxy_rt_renfe/main.py71
-rw-r--r--router-config.json7
10 files changed, 15 insertions, 2040 deletions
diff --git a/.gitmodules b/.gitmodules
index 61cea4d..b90a19f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,3 +5,6 @@
[submodule "build_tranvias"]
path = build_tranvias
url = https://github.com/tpgalicia/gtfs-coruna.git
+[submodule "build_xunta"]
+ path = build_xunta
+ url = https://github.com/tpgalicia/gtfs-xunta.git
diff --git a/README.md b/README.md
index 889bb7d..4f593e9 100644
--- a/README.md
+++ b/README.md
@@ -37,17 +37,10 @@ git submodule update --init --recursive
Descargar OpenTripPlanner, datos de OpenStreetMap y feeds:
```bash
-task download-otp
-task download-pbf
+task setup
task download-feeds NAP_API_KEY=tu_clave_de_api_aqui
```
-Iniciar el proxy de tiempo real de Renfe:
-
-```bash
-task proxy-renfe-rt
-```
-
Iniciar OpenTripPlanner:
```bash
diff --git a/Taskfile.yml b/Taskfile.yml
index e66e7da..80a34af 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -6,20 +6,18 @@ vars:
OTP_JAR: otp-shaded-2.8.1.jar
tasks:
- download-otp:
- desc: "Download the OpenTripPlanner JAR file"
+ setup:
+ desc: "Set up the project dependencies"
cmds:
- curl -L -o {{.OTP_JAR}} https://github.com/opentripplanner/OpenTripPlanner/releases/download/v2.8.1/otp-shaded-2.8.1.jar
-
- download-pbf:
- desc: "Download a sample PBF file for building the graph"
- cmds:
- curl -sLo galicia-latest.osm.pbf https://download.geofabrik.de/europe/spain/galicia-latest.osm.pbf
+ - uv --directory build_xunta run ./gen_parroquias.py --pbf ../galicia-latest.osm.pbf
download-xunta:
desc: "Download Xunta de Galicia GTFS data (NAP MITRAMS)"
cmds:
- - "curl -H \"ApiKey: {{.NAP_API_KEY}}\" -sLo feeds/xunta.zip https://nap.transportes.gob.es/api/Fichero/download/1584"
+ - uv --directory build_xunta run ./build_static_feed.py {{.NAP_API_KEY}}
+ - cp build_xunta/gtfs_xunta.zip feeds/xunta.zip
download-renfe:
desc: "Download Renfe GTFS data (NAP MITRAMS)"
diff --git a/build_renfe b/build_renfe
-Subproject e2c56e662c196d74bd5b33453cfdfc81488fdc5
+Subproject 43130f953f86942b349eb1e5cdf59110c02b81c
diff --git a/build_xunta b/build_xunta
new file mode 160000
+Subproject 2434fd8ea19122b381944527f2b19f1445e8973
diff --git a/proxy_rt_renfe/gtfsrt.proto b/proxy_rt_renfe/gtfsrt.proto
deleted file mode 100644
index e050fc1..0000000
--- a/proxy_rt_renfe/gtfsrt.proto
+++ /dev/null
@@ -1,1259 +0,0 @@
-// Copyright 2015 The GTFS Specifications Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Protocol definition file for GTFS Realtime.
-//
-// GTFS Realtime lets transit agencies provide consumers with realtime
-// information about disruptions to their service (stations closed, lines not
-// operating, important delays etc), location of their vehicles and expected
-// arrival times.
-//
-// This protocol is published at:
-// https://github.com/google/transit/tree/master/gtfs-realtime
-
-syntax = "proto2";
-option java_package = "com.google.transit.realtime";
-package transit_realtime;
-
-// The contents of a feed message.
-// A feed is a continuous stream of feed messages. Each message in the stream is
-// obtained as a response to an appropriate HTTP GET request.
-// A realtime feed is always defined with relation to an existing GTFS feed.
-// All the entity ids are resolved with respect to the GTFS feed.
-// Note that "required" and "optional" as stated in this file refer to Protocol
-// Buffer cardinality, not semantic cardinality. See reference.md at
-// https://github.com/google/transit/tree/master/gtfs-realtime for field
-// semantic cardinality.
-message FeedMessage {
- // Metadata about this feed and feed message.
- required FeedHeader header = 1;
-
- // Contents of the feed.
- repeated FeedEntity entity = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// Metadata about a feed, included in feed messages.
-message FeedHeader {
- // Version of the feed specification.
- // The current version is 2.0. Valid versions are "2.0", "1.0".
- required string gtfs_realtime_version = 1;
-
- // Determines whether the current fetch is incremental. Currently,
- // DIFFERENTIAL mode is unsupported and behavior is unspecified for feeds
- // that use this mode. There are discussions on the GTFS Realtime mailing
- // list around fully specifying the behavior of DIFFERENTIAL mode and the
- // documentation will be updated when those discussions are finalized.
- enum Incrementality {
- FULL_DATASET = 0;
- DIFFERENTIAL = 1;
- }
- optional Incrementality incrementality = 2 [default = FULL_DATASET];
-
- // This timestamp identifies the moment when the content of this feed has been
- // created (in server time). In POSIX time (i.e., number of seconds since
- // January 1st 1970 00:00:00 UTC).
- optional uint64 timestamp = 3;
-
- // String that matches the feed_info.feed_version from the GTFS feed that the real
- // time data is based on. Consumers can use this to identify which GTFS feed is
- // currently active or when a new one is available to download.
- optional string feed_version = 4;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// A definition (or update) of an entity in the transit feed.
-message FeedEntity {
- // The ids are used only to provide incrementality support. The id should be
- // unique within a FeedMessage. Consequent FeedMessages may contain
- // FeedEntities with the same id. In case of a DIFFERENTIAL update the new
- // FeedEntity with some id will replace the old FeedEntity with the same id
- // (or delete it - see is_deleted below).
- // The actual GTFS entities (e.g. stations, routes, trips) referenced by the
- // feed must be specified by explicit selectors (see EntitySelector below for
- // more info).
- required string id = 1;
-
- // Whether this entity is to be deleted. Relevant only for incremental
- // fetches.
- optional bool is_deleted = 2 [default = false];
-
- // Data about the entity itself. Exactly one of the following fields must be
- // present (unless the entity is being deleted).
- optional TripUpdate trip_update = 3;
- optional VehiclePosition vehicle = 4;
- optional Alert alert = 5;
-
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional Shape shape = 6;
- optional Stop stop = 7;
- optional TripModifications trip_modifications = 8;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-//
-// Entities used in the feed.
-//
-
-// Realtime update of the progress of a vehicle along a trip.
-// Depending on the value of ScheduleRelationship, a TripUpdate can specify:
-// - A trip that proceeds along the schedule.
-// - A trip that proceeds along a route but has no fixed schedule.
-// - A trip that have been added or removed with regard to schedule.
-//
-// The updates can be for future, predicted arrival/departure events, or for
-// past events that already occurred.
-// Normally, updates should get more precise and more certain (see
-// uncertainty below) as the events gets closer to current time.
-// Even if that is not possible, the information for past events should be
-// precise and certain. In particular, if an update points to time in the past
-// but its update's uncertainty is not 0, the client should conclude that the
-// update is a (wrong) prediction and that the trip has not completed yet.
-//
-// Note that the update can describe a trip that is already completed.
-// To this end, it is enough to provide an update for the last stop of the trip.
-// If the time of that is in the past, the client will conclude from that that
-// the whole trip is in the past (it is possible, although inconsequential, to
-// also provide updates for preceding stops).
-// This option is most relevant for a trip that has completed ahead of schedule,
-// but according to the schedule, the trip is still proceeding at the current
-// time. Removing the updates for this trip could make the client assume
-// that the trip is still proceeding.
-// Note that the feed provider is allowed, but not required, to purge past
-// updates - this is one case where this would be practically useful.
-message TripUpdate {
- // The Trip that this message applies to. There can be at most one
- // TripUpdate entity for each actual trip instance.
- // If there is none, that means there is no prediction information available.
- // It does *not* mean that the trip is progressing according to schedule.
- required TripDescriptor trip = 1;
-
- // Additional information on the vehicle that is serving this trip.
- optional VehicleDescriptor vehicle = 3;
-
- // Timing information for a single predicted event (either arrival or
- // departure).
- // Timing consists of delay and/or estimated time, and uncertainty.
- // - delay should be used when the prediction is given relative to some
- // existing schedule in GTFS.
- // - time should be given whether there is a predicted schedule or not. If
- // both time and delay are specified, time will take precedence
- // (although normally, time, if given for a scheduled trip, should be
- // equal to scheduled time in GTFS + delay).
- //
- // Uncertainty applies equally to both time and delay.
- // The uncertainty roughly specifies the expected error in true delay (but
- // note, we don't yet define its precise statistical meaning). It's possible
- // for the uncertainty to be 0, for example for trains that are driven under
- // computer timing control.
- message StopTimeEvent {
- // Delay (in seconds) can be positive (meaning that the vehicle is late) or
- // negative (meaning that the vehicle is ahead of schedule). Delay of 0
- // means that the vehicle is exactly on time.
- optional int32 delay = 1;
-
- // Event as absolute time.
- // In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- // UTC).
- optional int64 time = 2;
-
- // If uncertainty is omitted, it is interpreted as unknown.
- // If the prediction is unknown or too uncertain, the delay (or time) field
- // should be empty. In such case, the uncertainty field is ignored.
- // To specify a completely certain prediction, set its uncertainty to 0.
- optional int32 uncertainty = 3;
-
- // Scheduled time for a NEW, REPLACEMENT, or DUPLICATED trip.
- // In Unix time (i.e., number of seconds since January 1st 1970 00:00:00
- // UTC).
- // Optional if TripUpdate.schedule_relationship is NEW, REPLACEMENT or DUPLICATED, forbidden otherwise.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional int64 scheduled_time = 4;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features
- // and modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- // 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.
- message StopTimeUpdate {
- // 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.
-
- // Must be the same as in stop_times.txt in the corresponding GTFS feed.
- optional uint32 stop_sequence = 1;
- // Must be the same as in stops.txt in the corresponding GTFS feed.
- optional string stop_id = 4;
-
- optional StopTimeEvent arrival = 2;
- optional StopTimeEvent departure = 3;
-
- // 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.
- optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
- // The relation between the StopTimeEvents and the static schedule.
- enum ScheduleRelationship {
- // 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;
- }
- optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
-
- // 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.
- message StopTimeProperties {
- // 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.
- optional string assigned_stop_id = 1;
-
- // The updated headsign of the vehicle at the stop.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string stop_headsign = 2;
-
- enum DropOffPickupType {
- // Regularly scheduled pickup/dropoff.
- REGULAR = 0;
-
- // No pickup/dropoff available
- NONE = 1;
-
- // Must phone agency to arrange pickup/dropoff.
- PHONE_AGENCY = 2;
-
- // Must coordinate with driver to arrange pickup/dropoff.
- COORDINATE_WITH_DRIVER = 3;
- }
-
- // The updated pickup of the vehicle at the stop.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional DropOffPickupType pickup_type = 3;
-
- // The updated drop off of the vehicle at the stop.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional DropOffPickupType drop_off_type = 4;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features
- // and modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- // 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.
- optional StopTimeProperties stop_time_properties = 6;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features
- // and modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- // Updates to StopTimes for the trip (both future, i.e., predictions, and in
- // some cases, past ones, i.e., those that already happened).
- // The updates must be sorted by stop_sequence, and apply for all the
- // following stops of the trip up to the next specified one.
- //
- // Example 1:
- // For a trip with 20 stops, a StopTimeUpdate with arrival delay and departure
- // delay of 0 for stop_sequence of the current stop means that the trip is
- // exactly on time.
- //
- // Example 2:
- // For the same trip instance, 3 StopTimeUpdates are provided:
- // - delay of 5 min for stop_sequence 3
- // - delay of 1 min for stop_sequence 8
- // - delay of unspecified duration for stop_sequence 10
- // This will be interpreted as:
- // - stop_sequences 3,4,5,6,7 have delay of 5 min.
- // - stop_sequences 8,9 have delay of 1 min.
- // - stop_sequences 10,... have unknown delay.
- repeated StopTimeUpdate stop_time_update = 2;
-
- // The most recent moment at which the vehicle's real-time progress was measured
- // to estimate StopTimes in the future. When StopTimes in the past are provided,
- // arrival/departure times may be earlier than this value. In POSIX
- // time (i.e., the number of seconds since January 1st 1970 00:00:00 UTC).
- optional uint64 timestamp = 4;
-
- // The current schedule deviation for the trip. Delay should only be
- // specified when the prediction is given relative to some existing schedule
- // in GTFS.
- //
- // Delay (in seconds) can be positive (meaning that the vehicle is late) or
- // negative (meaning that the vehicle is ahead of schedule). Delay of 0
- // means that the vehicle is exactly on time.
- //
- // Delay information in StopTimeUpdates take precedent of trip-level delay
- // information, such that trip-level delay is only propagated until the next
- // stop along the trip with a StopTimeUpdate delay value specified.
- //
- // Feed providers are strongly encouraged to provide a TripUpdate.timestamp
- // value indicating when the delay value was last updated, in order to
- // evaluate the freshness of the data.
- //
- // NOTE: This field is still experimental, and subject to change. It may be
- // formally adopted in the future.
- optional int32 delay = 5;
-
- // Defines updated properties of the trip, such as a new shape_id when there is a detour. Or defines the
- // trip_id, start_date, and start_time of a DUPLICATED trip.
- // NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
- message TripProperties {
- // Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
- // but will start at a different service date and/or time (defined using the TripProperties.start_date and
- // TripProperties.start_time fields). See definition of trips.trip_id in (CSV) GTFS. Its value must be different
- // than the ones used in the (CSV) GTFS. Required if schedule_relationship=DUPLICATED, otherwise this field must not
- // be populated and will be ignored by consumers.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string trip_id = 1;
- // Service date on which the DUPLICATED trip will be run, in YYYYMMDD format. Required if
- // schedule_relationship=DUPLICATED, otherwise this field must not be populated and will be ignored by consumers.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string start_date = 2;
- // Defines the departure start time of the trip when it’s duplicated. See definition of stop_times.departure_time
- // in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset
- // between the original trip departure_time and this field. For example, if a GTFS trip has stop A with a
- // departure_time of 10:00:00 and stop B with departure_time of 10:01:00, and this field is populated with the value
- // of 10:30:00, stop B on the duplicated trip will have a scheduled departure_time of 10:31:00. Real-time prediction
- // delay values are applied to this calculated schedule time to determine the predicted time. For example, if a
- // departure delay of 30 is provided for stop B, then the predicted departure time is 10:31:30. Real-time
- // prediction time values do not have any offset applied to them and indicate the predicted time as provided.
- // For example, if a departure time representing 10:31:30 is provided for stop B, then the predicted departure time
- // is 10:31:30. This field is required if schedule_relationship is DUPLICATED, otherwise this field must not be
- // populated and will be ignored by consumers.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string start_time = 3;
- // Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS
- // or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS.
- // If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed.
- // The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS.
- // If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
- // Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string shape_id = 4;
-
- // Specifies the headsign for this trip when it differs from the original.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string trip_headsign = 5;
-
- // Specifies the name for this trip when it differs from the original.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string trip_short_name = 6;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features
- // and modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
- optional TripProperties trip_properties = 6;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// Realtime positioning information for a given vehicle.
-message VehiclePosition {
- // The Trip that this vehicle is serving.
- // Can be empty or partial if the vehicle can not be identified with a given
- // trip instance.
- optional TripDescriptor trip = 1;
-
- // Additional information on the vehicle that is serving this trip.
- optional VehicleDescriptor vehicle = 8;
-
- // Current position of this vehicle.
- optional Position position = 2;
-
- // 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.
- optional uint32 current_stop_sequence = 3;
- // Identifies the current stop. The value must be the same as in stops.txt in
- // the corresponding GTFS feed.
- optional string stop_id = 7;
-
- 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;
- }
- // The exact status of the vehicle with respect to the current stop.
- // Ignored if current_stop_sequence is missing.
- optional VehicleStopStatus current_status = 4 [default = IN_TRANSIT_TO];
-
- // 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).
- optional uint64 timestamp = 5;
-
- // Congestion level that is affecting this vehicle.
- enum CongestionLevel {
- UNKNOWN_CONGESTION_LEVEL = 0;
- RUNNING_SMOOTHLY = 1;
- STOP_AND_GO = 2;
- CONGESTION = 3;
- SEVERE_CONGESTION = 4; // People leaving their cars.
- }
- optional CongestionLevel congestion_level = 6;
-
- // 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.
- enum OccupancyStatus {
- // 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;
-
- }
- // If multi_carriage_status is populated with per-carriage OccupancyStatus,
- // then this field should describe the entire vehicle with all carriages accepting passengers considered.
- optional OccupancyStatus occupancy_status = 9;
-
- // 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.
- optional uint32 occupancy_percentage = 10;
-
- // 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.
- message CarriageDetails {
-
- // Identification of the carriage. Should be unique per vehicle.
- optional string id = 1;
-
- // 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.
- optional string label = 2;
-
- // 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.
- optional OccupancyStatus occupancy_status = 3 [default = NO_DATA_AVAILABLE];
-
- // 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.
- optional int32 occupancy_percentage = 4 [default = -1];
-
- // 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.
- optional uint32 carriage_sequence = 5;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- // 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.
- repeated CarriageDetails multi_carriage_details = 11;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// An alert, indicating some sort of incident in the public transit network.
-message Alert {
- // Time when the alert should be shown to the user. If missing, the
- // alert will be shown as long as it appears in the feed.
- // If multiple ranges are given, the alert will be shown during all of them.
- repeated TimeRange active_period = 1;
-
- // Entities whose users we should notify of this alert.
- repeated EntitySelector informed_entity = 5;
-
- // Cause of this alert. If cause_detail is included, then Cause must also be included.
- enum Cause {
- UNKNOWN_CAUSE = 1;
- OTHER_CAUSE = 2; // Not machine-representable.
- TECHNICAL_PROBLEM = 3;
- STRIKE = 4; // Public transit agency employees stopped working.
- DEMONSTRATION = 5; // People are blocking the streets.
- ACCIDENT = 6;
- HOLIDAY = 7;
- WEATHER = 8;
- MAINTENANCE = 9;
- CONSTRUCTION = 10;
- POLICE_ACTIVITY = 11;
- MEDICAL_EMERGENCY = 12;
- }
- optional Cause cause = 6 [default = UNKNOWN_CAUSE];
-
- // What is the effect of this problem on the affected entity. If effect_detail is included, then Effect must also be included.
- enum Effect {
- NO_SERVICE = 1;
- REDUCED_SERVICE = 2;
-
- // We don't care about INsignificant delays: they are hard to detect, have
- // little impact on the user, and would clutter the results as they are too
- // frequent.
- SIGNIFICANT_DELAYS = 3;
-
- DETOUR = 4;
- ADDITIONAL_SERVICE = 5;
- MODIFIED_SERVICE = 6;
- OTHER_EFFECT = 7;
- UNKNOWN_EFFECT = 8;
- STOP_MOVED = 9;
- NO_EFFECT = 10;
- ACCESSIBILITY_ISSUE = 11;
- }
- optional Effect effect = 7 [default = UNKNOWN_EFFECT];
-
- // The URL which provides additional information about the alert.
- optional TranslatedString url = 8;
-
- // Alert header. Contains a short summary of the alert text as plain-text.
- optional TranslatedString header_text = 10;
-
- // Full description for the alert as plain-text. The information in the
- // description should add to the information of the header.
- optional TranslatedString description_text = 11;
-
- // Text for alert header to be used in text-to-speech implementations. This field is the text-to-speech version of header_text.
- optional TranslatedString tts_header_text = 12;
-
- // Text for full description for the alert to be used in text-to-speech implementations. This field is the text-to-speech version of description_text.
- optional TranslatedString tts_description_text = 13;
-
- // Severity of this alert.
- enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
- }
-
- optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
-
- // TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
- // The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
-
- // Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
- // or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedString image_alternative_text = 16;
-
-
- // Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedString cause_detail = 17;
-
- // Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedString effect_detail = 18;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features
- // and modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-//
-// Low level data structures used above.
-//
-
-// A time interval. The interval is considered active at time 't' if 't' is
-// greater than or equal to the start time and less than the end time.
-message TimeRange {
- // Start time, in POSIX time (i.e., number of seconds since January 1st 1970
- // 00:00:00 UTC).
- // If missing, the interval starts at minus infinity.
- optional uint64 start = 1;
-
- // End time, in POSIX time (i.e., number of seconds since January 1st 1970
- // 00:00:00 UTC).
- // If missing, the interval ends at plus infinity.
- optional uint64 end = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// A position.
-message Position {
- // Degrees North, in the WGS-84 coordinate system.
- required float latitude = 1;
-
- // Degrees East, in the WGS-84 coordinate system.
- required float longitude = 2;
-
- // Bearing, in degrees, clockwise from North, i.e., 0 is North and 90 is East.
- // This can be the compass bearing, or the direction towards the next stop
- // or intermediate location.
- // This should not be direction deduced from the sequence of previous
- // positions, which can be computed from previous data.
- optional float bearing = 3;
-
- // Odometer value, in meters.
- optional double odometer = 4;
- // Momentary speed measured by the vehicle, in meters per second.
- optional float speed = 5;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// A descriptor that identifies an instance of a GTFS trip, or all instances of
-// a trip along a route.
-// - To specify a single trip instance, the trip_id (and if necessary,
-// start_time) is set. If route_id is also set, then it should be same as one
-// that the given trip corresponds to.
-// - To specify all the trips along a given route, only the route_id should be
-// set. Note that if the trip_id is not known, then stop sequence ids in
-// TripUpdate are not sufficient, and stop_ids must be provided as well. In
-// addition, absolute arrival/departure times must be provided.
-message TripDescriptor {
- // The trip_id from the GTFS feed that this selector refers to.
- // For non frequency-based trips, this field is enough to uniquely identify
- // the trip. For frequency-based trip, start_time and start_date might also be
- // necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from
- // static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id
- // identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
- optional string trip_id = 1;
-
- // The route_id from the GTFS that this selector refers to.
- optional string route_id = 5;
-
- // The direction_id from the GTFS feed trips.txt file, indicating the
- // direction of travel for trips this selector refers to.
- optional uint32 direction_id = 6;
-
- // The initially scheduled start time of this trip instance.
- // When the trip_id corresponds to a non-frequency-based trip, this field
- // should either be omitted or be equal to the value in the GTFS feed. When
- // the trip_id correponds to a frequency-based trip, the start_time must be
- // specified for trip updates and vehicle positions. If the trip corresponds
- // to exact_times=1 GTFS record, then start_time must be some multiple
- // (including zero) of headway_secs later than frequencies.txt start_time for
- // the corresponding time period. If the trip corresponds to exact_times=0,
- // then its start_time may be arbitrary, and is initially expected to be the
- // first departure of the trip. Once established, the start_time of this
- // frequency-based trip should be considered immutable, even if the first
- // departure time changes -- that time change may instead be reflected in a
- // StopTimeUpdate.
- // Format and semantics of the field is same as that of
- // GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
- optional string start_time = 2;
- // The scheduled start date of this trip instance.
- // Must be provided to disambiguate trips that are so late as to collide with
- // a scheduled trip on a next day. For example, for a train that departs 8:00
- // and 20:00 every day, and is 12 hours late, there would be two distinct
- // trips on the same time.
- // This field can be provided but is not mandatory for schedules in which such
- // collisions are impossible - for example, a service running on hourly
- // schedule where a vehicle that is one hour late is not considered to be
- // related to schedule anymore.
- // In YYYYMMDD format.
- optional string start_date = 3;
-
- // The relation between this trip and the static schedule. If a trip is done
- // in accordance with temporary schedule, not reflected in GTFS, then it
- // shouldn't be marked as SCHEDULED, but likely as ADDED.
- enum ScheduleRelationship {
- // Trip that is running in accordance with its GTFS schedule, or is close
- // enough to the scheduled trip to be associated with it.
- SCHEDULED = 0;
-
- // This value has been deprecated as the behavior was unspecified.
- // Use DUPLICATED for an extra trip that is the same as a scheduled trip except the start date or time,
- // or NEW for an extra trip that is unrelated to an existing trip.
- ADDED = 1 [deprecated = true];
-
- // A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0).
- // Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
- UNSCHEDULED = 2;
-
- // A trip that existed in the schedule but was removed.
- CANCELED = 3;
-
- // A trip that replaces an existing trip in the schedule.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- REPLACEMENT = 5;
-
- // An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
- // respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
- // and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service
- // date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS
- // (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is
- // identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by
- // TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate
- // TripUpdate with the value of CANCELED or DELETED. If a producer wants to replace the original trip, a value of
- // `REPLACEMENT` should be used instead.
- //
- // Trips defined in GTFS frequencies.txt with exact_times that is
- // empty or equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain
- // the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship
- // must also be set to DUPLICATED.
- // Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow
- // the migration guide (https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md)
- // to transition to the DUPLICATED enumeration.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- DUPLICATED = 6;
-
-
- // A trip that existed in the schedule but was removed and must not be shown to users.
- // DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove
- // information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to
- // riders, e.g. a trip that is entirely being replaced by another trip.
- // This designation becomes particularly important if several trips are cancelled and replaced with substitute service.
- // If consumers were to show explicit information about the cancellations it would distract from the more important
- // real-time predictions.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- DELETED = 7;
-
- // An extra trip unrelated to any existing trips, for example, to respond to sudden passenger load.
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- NEW = 8;
- }
- optional ScheduleRelationship schedule_relationship = 4;
-
- message ModifiedTripSelector {
- // The 'id' from the FeedEntity in which the contained TripModifications object affects this trip.
- optional string modifications_id = 1;
-
- // The trip_id from the GTFS feed that is modified by the modifications_id
- optional string affected_trip_id = 2;
-
- // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
- optional string start_time = 3;
-
- // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
- optional string start_date = 4;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
- // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
- optional ModifiedTripSelector modified_trip = 7;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// Identification information for the vehicle performing the trip.
-message VehicleDescriptor {
- // 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.
- optional string id = 1;
-
- // User visible label, i.e., something that must be shown to the passenger to
- // help identify the correct vehicle.
- optional string label = 2;
-
- // The license plate of the vehicle.
- optional string license_plate = 3;
-
- enum WheelchairAccessible {
- // The trip doesn't have information about wheelchair accessibility.
- // This is the **default** behavior. If the static GTFS contains a
- // _wheelchair_accessible_ value, it won't be overwritten.
- NO_VALUE = 0;
-
- // The trip has no accessibility value present.
- // This value will overwrite the value from the GTFS.
- UNKNOWN = 1;
-
- // The trip is wheelchair accessible.
- // This value will overwrite the value from the GTFS.
- WHEELCHAIR_ACCESSIBLE = 2;
-
- // The trip is **not** wheelchair accessible.
- // This value will overwrite the value from the GTFS.
- WHEELCHAIR_INACCESSIBLE = 3;
- }
- optional WheelchairAccessible wheelchair_accessible = 4 [default = NO_VALUE];
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// A selector for an entity in a GTFS feed.
-message EntitySelector {
- // The values of the fields should correspond to the appropriate fields in the
- // GTFS feed.
- // At least one specifier must be given. If several are given, then the
- // matching has to apply to all the given specifiers.
- optional string agency_id = 1;
- optional string route_id = 2;
- // corresponds to route_type in GTFS.
- optional int32 route_type = 3;
- optional TripDescriptor trip = 4;
- optional string stop_id = 5;
- // Corresponds to trip direction_id in GTFS trips.txt. If provided the
- // route_id must also be provided.
- optional uint32 direction_id = 6;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// An internationalized message containing per-language versions of a snippet of
-// text or a URL.
-// One of the strings from a message will be picked up. The resolution proceeds
-// as follows:
-// 1. If the UI language matches the language code of a translation,
-// the first matching translation is picked.
-// 2. If a default UI language (e.g., English) matches the language code of a
-// translation, the first matching translation is picked.
-// 3. If some translation has an unspecified language code, that translation is
-// picked.
-message TranslatedString {
- message Translation {
- // A UTF-8 string containing the message.
- required string text = 1;
- // BCP-47 language code. Can be omitted if the language is unknown or if
- // no i18n is done at all for the feed. At most one translation is
- // allowed to have an unspecified language tag.
- optional string language = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
- // At least one translation must be provided.
- repeated Translation translation = 1;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// An internationalized image containing per-language versions of a URL linking to an image
-// along with meta information
-// Only one of the images from a message will be retained by consumers. The resolution proceeds
-// as follows:
-// 1. If the UI language matches the language code of a translation,
-// the first matching translation is picked.
-// 2. If a default UI language (e.g., English) matches the language code of a
-// translation, the first matching translation is picked.
-// 3. If some translation has an unspecified language code, that translation is
-// picked.
-// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
-message TranslatedImage {
- message LocalizedImage {
- // String containing an URL linking to an image
- // The image linked must be less than 2MB.
- // If an image changes in a significant enough way that an update is required on the consumer side, the producer must update the URL to a new one.
- // The URL should be a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values.
- required string url = 1;
-
- // IANA media type as to specify the type of image to be displayed.
- // The type must start with "image/"
- required string media_type = 2;
-
- // BCP-47 language code. Can be omitted if the language is unknown or if
- // no i18n is done at all for the feed. At most one translation is
- // allowed to have an unspecified language tag.
- optional string language = 3;
-
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
- // At least one localized image must be provided.
- repeated LocalizedImage localized_image = 1;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// Describes the physical path that a vehicle takes when it's not part of the (CSV) GTFS,
-// such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points.
-// Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
-// the location of Stops exactly, but all Stops on a trip should lie within a small distance of
-// the shape for that trip, i.e. close to straight line segments connecting the shape points
-// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
-message Shape {
- // Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
- // This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
- // See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string shape_id = 1;
-
- // Encoded polyline representation of the shape. This polyline must contain at least two points and represent the full shape of the trip where it's used.
- // For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
- // This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
- // See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
- // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional string encoded_polyline = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// Describes a stop which is served by trips. All fields are as described in the GTFS-Static specification.
-// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
-message Stop {
- enum WheelchairBoarding {
- UNKNOWN = 0;
- AVAILABLE = 1;
- NOT_AVAILABLE = 2;
- }
-
- optional string stop_id = 1;
- optional TranslatedString stop_code = 2;
- optional TranslatedString stop_name = 3;
- optional TranslatedString tts_stop_name = 4;
- optional TranslatedString stop_desc = 5;
- optional float stop_lat = 6;
- optional float stop_lon = 7;
- optional string zone_id = 8;
- optional TranslatedString stop_url = 9;
- optional string parent_station = 11;
- optional string stop_timezone = 12;
- optional WheelchairBoarding wheelchair_boarding = 13 [default = UNKNOWN];
- optional string level_id = 14;
- optional TranslatedString platform_code = 15;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
-message TripModifications {
- // A `Modification` message replaces a span of n stop times from each affected trip starting at `start_stop_selector`.
- message Modification {
- // The stop selector of the first stop_time of the original trip that is to be affected by this modification.
- // Used in conjuction with `end_stop_selector`.
- // `start_stop_selector` is required and is used to define the reference stop used with `travel_time_to_stop`.
- optional StopSelector start_stop_selector = 1;
-
- // The stop selector of the last stop of the original trip that is to be affected by this modification.
- // The selection is inclusive, so if only one stop_time is replaced by that modification, `start_stop_selector` and `end_stop_selector` must be equivalent.
- // If no stop_time is replaced, `end_stop_selector` must not be provided. It's otherwise required.
- optional StopSelector end_stop_selector = 2;
-
- // The number of seconds of delay to add to all departure and arrival times following the end of this modification.
- // If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
- optional int32 propagated_modification_delay = 3 [default = 0];
-
- // A list of replacement stops, replacing those of the original trip.
- // The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
- repeated ReplacementStop replacement_stops = 4;
-
- // An `id` value from the `FeedEntity` message that contains the `Alert` describing this Modification for user-facing communication.
- optional string service_alert_id = 5;
-
- // This timestamp identifies the moment when the modification has last been changed.
- // In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
- optional uint64 last_modified_time = 6;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- message SelectedTrips {
- // A list of trips affected with this replacement that all have the same new `shape_id`. A `TripUpdate` with `schedule_relationship=REPLACEMENT` must not already exist for the trip.
- repeated string trip_ids = 1;
- // The ID of the new shape for the modified trips in this SelectedTrips.
- // May refer to a new shape added using a `Shape` message in the same GTFS-RT feed, or to an existing shape defined in the GTFS-Static feed’s shapes.txt.
- // If it refers to a `Shape` entity in the real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
- optional string shape_id = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
- }
-
- // A list of selected trips affected by this TripModifications.
- repeated SelectedTrips selected_trips = 1;
-
- // A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
- // Useful to target multiple departures of a trip_id in a frequency-based trip.
- repeated string start_times = 2;
-
- // Dates on which the modifications occurs, in the YYYYMMDD format. Producers SHOULD only transmit detours occurring within the next week.
- // The dates provided should not be used as user-facing information, if a user-facing start and end date needs to be provided, they can be provided in the linked service alert with `service_alert_id`
- repeated string service_dates = 3;
-
- // A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
-// Select a stop by stop sequence or by stop_id. At least one of the two values must be provided.
-message StopSelector {
- // Must be the same as in stop_times.txt in the corresponding GTFS feed.
- optional uint32 stop_sequence = 1;
- // Must be the same as in stops.txt in the corresponding GTFS feed.
- optional string stop_id = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-}
-
-// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
-message ReplacementStop {
- // The difference in seconds between the arrival time at this stop and the arrival time at the reference stop. The reference stop is the stop prior to start_stop_selector. If the modification begins at the first stop of the trip, then the first stop of the trip is the reference stop.
- // This value MUST be monotonically increasing and may only be a negative number if the first stop of the original trip is the reference stop.
- optional int32 travel_time_to_stop = 1;
-
- // The replacement stop ID which will now be visited by the trip. May refer to a new stop added using a GTFS-RT `Stop` message in the same GTFS-RT feed, or to an existing stop defined in the (CSV) GTFS feed’s `stops.txt`.
- // If it refers to a `Shape` entity in the real-time feed, the value of this field should be the one of the `stop_id` inside the entity, and _not_ the `id` of `FeedEntity`. The replacement stop MUST have `location_type=0` (routable stops).
- optional string stop_id = 2;
-
- // The extensions namespace allows 3rd-party developers to extend the
- // GTFS Realtime Specification in order to add and evaluate new features and
- // modifications to the spec.
- extensions 1000 to 1999;
-
- // The following extension IDs are reserved for private use by any organization.
- extensions 9000 to 9999;
-} \ No newline at end of file
diff --git a/proxy_rt_renfe/gtfsrt_pb2.py b/proxy_rt_renfe/gtfsrt_pb2.py
deleted file mode 100644
index 53531c3..0000000
--- a/proxy_rt_renfe/gtfsrt_pb2.py
+++ /dev/null
@@ -1,117 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# NO CHECKED-IN PROTOBUF GENCODE
-# source: gtfsrt.proto
-# Protobuf Python Version: 6.33.0
-"""Generated protocol buffer code."""
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import descriptor_pool as _descriptor_pool
-from google.protobuf import runtime_version as _runtime_version
-from google.protobuf import symbol_database as _symbol_database
-from google.protobuf.internal import builder as _builder
-_runtime_version.ValidateProtobufRuntimeVersion(
- _runtime_version.Domain.PUBLIC,
- 6,
- 33,
- 0,
- '',
- 'gtfsrt.proto'
-)
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cgtfsrt.proto\x12\x10transit_realtime\"y\n\x0b\x46\x65\x65\x64Message\x12,\n\x06header\x18\x01 \x02(\x0b\x32\x1c.transit_realtime.FeedHeader\x12,\n\x06\x65ntity\x18\x02 \x03(\x0b\x32\x1c.transit_realtime.FeedEntity*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xed\x01\n\nFeedHeader\x12\x1d\n\x15gtfs_realtime_version\x18\x01 \x02(\t\x12Q\n\x0eincrementality\x18\x02 \x01(\x0e\x32+.transit_realtime.FeedHeader.Incrementality:\x0c\x46ULL_DATASET\x12\x11\n\ttimestamp\x18\x03 \x01(\x04\x12\x14\n\x0c\x66\x65\x65\x64_version\x18\x04 \x01(\t\"4\n\x0eIncrementality\x12\x10\n\x0c\x46ULL_DATASET\x10\x00\x12\x10\n\x0c\x44IFFERENTIAL\x10\x01*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xe1\x02\n\nFeedEntity\x12\n\n\x02id\x18\x01 \x02(\t\x12\x19\n\nis_deleted\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x31\n\x0btrip_update\x18\x03 \x01(\x0b\x32\x1c.transit_realtime.TripUpdate\x12\x32\n\x07vehicle\x18\x04 \x01(\x0b\x32!.transit_realtime.VehiclePosition\x12&\n\x05\x61lert\x18\x05 \x01(\x0b\x32\x17.transit_realtime.Alert\x12&\n\x05shape\x18\x06 \x01(\x0b\x32\x17.transit_realtime.Shape\x12$\n\x04stop\x18\x07 \x01(\x0b\x32\x16.transit_realtime.Stop\x12?\n\x12trip_modifications\x18\x08 \x01(\x0b\x32#.transit_realtime.TripModifications*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xf6\x0b\n\nTripUpdate\x12.\n\x04trip\x18\x01 \x02(\x0b\x32 .transit_realtime.TripDescriptor\x12\x34\n\x07vehicle\x18\x03 \x01(\x0b\x32#.transit_realtime.VehicleDescriptor\x12\x45\n\x10stop_time_update\x18\x02 \x03(\x0b\x32+.transit_realtime.TripUpdate.StopTimeUpdate\x12\x11\n\ttimestamp\x18\x04 \x01(\x04\x12\r\n\x05\x64\x65lay\x18\x05 \x01(\x05\x12\x44\n\x0ftrip_properties\x18\x06 \x01(\x0b\x32+.transit_realtime.TripUpdate.TripProperties\x1ai\n\rStopTimeEvent\x12\r\n\x05\x64\x65lay\x18\x01 \x01(\x05\x12\x0c\n\x04time\x18\x02 \x01(\x03\x12\x13\n\x0buncertainty\x18\x03 \x01(\x05\x12\x16\n\x0escheduled_time\x18\x04 \x01(\x03*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\x1a\xb9\x07\n\x0eStopTimeUpdate\x12\x15\n\rstop_sequence\x18\x01 \x01(\r\x12\x0f\n\x07stop_id\x18\x04 \x01(\t\x12;\n\x07\x61rrival\x18\x02 \x01(\x0b\x32*.transit_realtime.TripUpdate.StopTimeEvent\x12=\n\tdeparture\x18\x03 \x01(\x0b\x32*.transit_realtime.TripUpdate.StopTimeEvent\x12U\n\x1a\x64\x65parture_occupancy_status\x18\x07 \x01(\x0e\x32\x31.transit_realtime.VehiclePosition.OccupancyStatus\x12j\n\x15schedule_relationship\x18\x05 \x01(\x0e\x32@.transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship:\tSCHEDULED\x12\\\n\x14stop_time_properties\x18\x06 \x01(\x0b\x32>.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties\x1a\xff\x02\n\x12StopTimeProperties\x12\x18\n\x10\x61ssigned_stop_id\x18\x01 \x01(\t\x12\x15\n\rstop_headsign\x18\x02 \x01(\t\x12\x65\n\x0bpickup_type\x18\x03 \x01(\x0e\x32P.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType\x12g\n\rdrop_off_type\x18\x04 \x01(\x0e\x32P.transit_realtime.TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType\"X\n\x11\x44ropOffPickupType\x12\x0b\n\x07REGULAR\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\x10\n\x0cPHONE_AGENCY\x10\x02\x12\x1a\n\x16\x43OORDINATE_WITH_DRIVER\x10\x03*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"P\n\x14ScheduleRelationship\x12\r\n\tSCHEDULED\x10\x00\x12\x0b\n\x07SKIPPED\x10\x01\x12\x0b\n\x07NO_DATA\x10\x02\x12\x0f\n\x0bUNSCHEDULED\x10\x03*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\x1a\x9b\x01\n\x0eTripProperties\x12\x0f\n\x07trip_id\x18\x01 \x01(\t\x12\x12\n\nstart_date\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\t\x12\x10\n\x08shape_id\x18\x04 \x01(\t\x12\x15\n\rtrip_headsign\x18\x05 \x01(\t\x12\x17\n\x0ftrip_short_name\x18\x06 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xdf\t\n\x0fVehiclePosition\x12.\n\x04trip\x18\x01 \x01(\x0b\x32 .transit_realtime.TripDescriptor\x12\x34\n\x07vehicle\x18\x08 \x01(\x0b\x32#.transit_realtime.VehicleDescriptor\x12,\n\x08position\x18\x02 \x01(\x0b\x32\x1a.transit_realtime.Position\x12\x1d\n\x15\x63urrent_stop_sequence\x18\x03 \x01(\r\x12\x0f\n\x07stop_id\x18\x07 \x01(\t\x12Z\n\x0e\x63urrent_status\x18\x04 \x01(\x0e\x32\x33.transit_realtime.VehiclePosition.VehicleStopStatus:\rIN_TRANSIT_TO\x12\x11\n\ttimestamp\x18\x05 \x01(\x04\x12K\n\x10\x63ongestion_level\x18\x06 \x01(\x0e\x32\x31.transit_realtime.VehiclePosition.CongestionLevel\x12K\n\x10occupancy_status\x18\t \x01(\x0e\x32\x31.transit_realtime.VehiclePosition.OccupancyStatus\x12\x1c\n\x14occupancy_percentage\x18\n \x01(\r\x12Q\n\x16multi_carriage_details\x18\x0b \x03(\x0b\x32\x31.transit_realtime.VehiclePosition.CarriageDetails\x1a\xd9\x01\n\x0f\x43\x61rriageDetails\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12^\n\x10occupancy_status\x18\x03 \x01(\x0e\x32\x31.transit_realtime.VehiclePosition.OccupancyStatus:\x11NO_DATA_AVAILABLE\x12 \n\x14occupancy_percentage\x18\x04 \x01(\x05:\x02-1\x12\x19\n\x11\x63\x61rriage_sequence\x18\x05 \x01(\r*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"G\n\x11VehicleStopStatus\x12\x0f\n\x0bINCOMING_AT\x10\x00\x12\x0e\n\nSTOPPED_AT\x10\x01\x12\x11\n\rIN_TRANSIT_TO\x10\x02\"}\n\x0f\x43ongestionLevel\x12\x1c\n\x18UNKNOWN_CONGESTION_LEVEL\x10\x00\x12\x14\n\x10RUNNING_SMOOTHLY\x10\x01\x12\x0f\n\x0bSTOP_AND_GO\x10\x02\x12\x0e\n\nCONGESTION\x10\x03\x12\x15\n\x11SEVERE_CONGESTION\x10\x04\"\xd9\x01\n\x0fOccupancyStatus\x12\t\n\x05\x45MPTY\x10\x00\x12\x18\n\x14MANY_SEATS_AVAILABLE\x10\x01\x12\x17\n\x13\x46\x45W_SEATS_AVAILABLE\x10\x02\x12\x16\n\x12STANDING_ROOM_ONLY\x10\x03\x12\x1e\n\x1a\x43RUSHED_STANDING_ROOM_ONLY\x10\x04\x12\x08\n\x04\x46ULL\x10\x05\x12\x1c\n\x18NOT_ACCEPTING_PASSENGERS\x10\x06\x12\x15\n\x11NO_DATA_AVAILABLE\x10\x07\x12\x11\n\rNOT_BOARDABLE\x10\x08*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xeb\n\n\x05\x41lert\x12\x32\n\ractive_period\x18\x01 \x03(\x0b\x32\x1b.transit_realtime.TimeRange\x12\x39\n\x0finformed_entity\x18\x05 \x03(\x0b\x32 .transit_realtime.EntitySelector\x12;\n\x05\x63\x61use\x18\x06 \x01(\x0e\x32\x1d.transit_realtime.Alert.Cause:\rUNKNOWN_CAUSE\x12>\n\x06\x65\x66\x66\x65\x63t\x18\x07 \x01(\x0e\x32\x1e.transit_realtime.Alert.Effect:\x0eUNKNOWN_EFFECT\x12/\n\x03url\x18\x08 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x37\n\x0bheader_text\x18\n \x01(\x0b\x32\".transit_realtime.TranslatedString\x12<\n\x10\x64\x65scription_text\x18\x0b \x01(\x0b\x32\".transit_realtime.TranslatedString\x12;\n\x0ftts_header_text\x18\x0c \x01(\x0b\x32\".transit_realtime.TranslatedString\x12@\n\x14tts_description_text\x18\r \x01(\x0b\x32\".transit_realtime.TranslatedString\x12O\n\x0eseverity_level\x18\x0e \x01(\x0e\x32%.transit_realtime.Alert.SeverityLevel:\x10UNKNOWN_SEVERITY\x12\x30\n\x05image\x18\x0f \x01(\x0b\x32!.transit_realtime.TranslatedImage\x12\x42\n\x16image_alternative_text\x18\x10 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x38\n\x0c\x63\x61use_detail\x18\x11 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x39\n\reffect_detail\x18\x12 \x01(\x0b\x32\".transit_realtime.TranslatedString\"\xd8\x01\n\x05\x43\x61use\x12\x11\n\rUNKNOWN_CAUSE\x10\x01\x12\x0f\n\x0bOTHER_CAUSE\x10\x02\x12\x15\n\x11TECHNICAL_PROBLEM\x10\x03\x12\n\n\x06STRIKE\x10\x04\x12\x11\n\rDEMONSTRATION\x10\x05\x12\x0c\n\x08\x41\x43\x43IDENT\x10\x06\x12\x0b\n\x07HOLIDAY\x10\x07\x12\x0b\n\x07WEATHER\x10\x08\x12\x0f\n\x0bMAINTENANCE\x10\t\x12\x10\n\x0c\x43ONSTRUCTION\x10\n\x12\x13\n\x0fPOLICE_ACTIVITY\x10\x0b\x12\x15\n\x11MEDICAL_EMERGENCY\x10\x0c\"\xdd\x01\n\x06\x45\x66\x66\x65\x63t\x12\x0e\n\nNO_SERVICE\x10\x01\x12\x13\n\x0fREDUCED_SERVICE\x10\x02\x12\x16\n\x12SIGNIFICANT_DELAYS\x10\x03\x12\n\n\x06\x44\x45TOUR\x10\x04\x12\x16\n\x12\x41\x44\x44ITIONAL_SERVICE\x10\x05\x12\x14\n\x10MODIFIED_SERVICE\x10\x06\x12\x10\n\x0cOTHER_EFFECT\x10\x07\x12\x12\n\x0eUNKNOWN_EFFECT\x10\x08\x12\x0e\n\nSTOP_MOVED\x10\t\x12\r\n\tNO_EFFECT\x10\n\x12\x17\n\x13\x41\x43\x43\x45SSIBILITY_ISSUE\x10\x0b\"H\n\rSeverityLevel\x12\x14\n\x10UNKNOWN_SEVERITY\x10\x01\x12\x08\n\x04INFO\x10\x02\x12\x0b\n\x07WARNING\x10\x03\x12\n\n\x06SEVERE\x10\x04*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"7\n\tTimeRange\x12\r\n\x05start\x18\x01 \x01(\x04\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x04*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"q\n\x08Position\x12\x10\n\x08latitude\x18\x01 \x02(\x02\x12\x11\n\tlongitude\x18\x02 \x02(\x02\x12\x0f\n\x07\x62\x65\x61ring\x18\x03 \x01(\x02\x12\x10\n\x08odometer\x18\x04 \x01(\x01\x12\r\n\x05speed\x18\x05 \x01(\x02*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xb7\x04\n\x0eTripDescriptor\x12\x0f\n\x07trip_id\x18\x01 \x01(\t\x12\x10\n\x08route_id\x18\x05 \x01(\t\x12\x14\n\x0c\x64irection_id\x18\x06 \x01(\r\x12\x12\n\nstart_time\x18\x02 \x01(\t\x12\x12\n\nstart_date\x18\x03 \x01(\t\x12T\n\x15schedule_relationship\x18\x04 \x01(\x0e\x32\x35.transit_realtime.TripDescriptor.ScheduleRelationship\x12L\n\rmodified_trip\x18\x07 \x01(\x0b\x32\x35.transit_realtime.TripDescriptor.ModifiedTripSelector\x1a\x82\x01\n\x14ModifiedTripSelector\x12\x18\n\x10modifications_id\x18\x01 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_trip_id\x18\x02 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\t\x12\x12\n\nstart_date\x18\x04 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\x8a\x01\n\x14ScheduleRelationship\x12\r\n\tSCHEDULED\x10\x00\x12\r\n\x05\x41\x44\x44\x45\x44\x10\x01\x1a\x02\x08\x01\x12\x0f\n\x0bUNSCHEDULED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\x0f\n\x0bREPLACEMENT\x10\x05\x12\x0e\n\nDUPLICATED\x10\x06\x12\x0b\n\x07\x44\x45LETED\x10\x07\x12\x07\n\x03NEW\x10\x08*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xa3\x02\n\x11VehicleDescriptor\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x15\n\rlicense_plate\x18\x03 \x01(\t\x12\x61\n\x15wheelchair_accessible\x18\x04 \x01(\x0e\x32\x38.transit_realtime.VehicleDescriptor.WheelchairAccessible:\x08NO_VALUE\"i\n\x14WheelchairAccessible\x12\x0c\n\x08NO_VALUE\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x19\n\x15WHEELCHAIR_ACCESSIBLE\x10\x02\x12\x1b\n\x17WHEELCHAIR_INACCESSIBLE\x10\x03*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xb0\x01\n\x0e\x45ntitySelector\x12\x11\n\tagency_id\x18\x01 \x01(\t\x12\x10\n\x08route_id\x18\x02 \x01(\t\x12\x12\n\nroute_type\x18\x03 \x01(\x05\x12.\n\x04trip\x18\x04 \x01(\x0b\x32 .transit_realtime.TripDescriptor\x12\x0f\n\x07stop_id\x18\x05 \x01(\t\x12\x14\n\x0c\x64irection_id\x18\x06 \x01(\r*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xa6\x01\n\x10TranslatedString\x12\x43\n\x0btranslation\x18\x01 \x03(\x0b\x32..transit_realtime.TranslatedString.Translation\x1a=\n\x0bTranslation\x12\x0c\n\x04text\x18\x01 \x02(\t\x12\x10\n\x08language\x18\x02 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xc1\x01\n\x0fTranslatedImage\x12I\n\x0flocalized_image\x18\x01 \x03(\x0b\x32\x30.transit_realtime.TranslatedImage.LocalizedImage\x1aS\n\x0eLocalizedImage\x12\x0b\n\x03url\x18\x01 \x02(\t\x12\x12\n\nmedia_type\x18\x02 \x02(\t\x12\x10\n\x08language\x18\x03 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"C\n\x05Shape\x12\x10\n\x08shape_id\x18\x01 \x01(\t\x12\x18\n\x10\x65ncoded_polyline\x18\x02 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\x84\x05\n\x04Stop\x12\x0f\n\x07stop_id\x18\x01 \x01(\t\x12\x35\n\tstop_code\x18\x02 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x35\n\tstop_name\x18\x03 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x39\n\rtts_stop_name\x18\x04 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x35\n\tstop_desc\x18\x05 \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x10\n\x08stop_lat\x18\x06 \x01(\x02\x12\x10\n\x08stop_lon\x18\x07 \x01(\x02\x12\x0f\n\x07zone_id\x18\x08 \x01(\t\x12\x34\n\x08stop_url\x18\t \x01(\x0b\x32\".transit_realtime.TranslatedString\x12\x16\n\x0eparent_station\x18\x0b \x01(\t\x12\x15\n\rstop_timezone\x18\x0c \x01(\t\x12O\n\x13wheelchair_boarding\x18\r \x01(\x0e\x32).transit_realtime.Stop.WheelchairBoarding:\x07UNKNOWN\x12\x10\n\x08level_id\x18\x0e \x01(\t\x12\x39\n\rplatform_code\x18\x0f \x01(\x0b\x32\".transit_realtime.TranslatedString\"C\n\x12WheelchairBoarding\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x11\n\rNOT_AVAILABLE\x10\x02*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"\xdf\x04\n\x11TripModifications\x12I\n\x0eselected_trips\x18\x01 \x03(\x0b\x32\x31.transit_realtime.TripModifications.SelectedTrips\x12\x13\n\x0bstart_times\x18\x02 \x03(\t\x12\x15\n\rservice_dates\x18\x03 \x03(\t\x12G\n\rmodifications\x18\x04 \x03(\x0b\x32\x30.transit_realtime.TripModifications.Modification\x1a\xb4\x02\n\x0cModification\x12;\n\x13start_stop_selector\x18\x01 \x01(\x0b\x32\x1e.transit_realtime.StopSelector\x12\x39\n\x11\x65nd_stop_selector\x18\x02 \x01(\x0b\x32\x1e.transit_realtime.StopSelector\x12(\n\x1dpropagated_modification_delay\x18\x03 \x01(\x05:\x01\x30\x12<\n\x11replacement_stops\x18\x04 \x03(\x0b\x32!.transit_realtime.ReplacementStop\x12\x18\n\x10service_alert_id\x18\x05 \x01(\t\x12\x1a\n\x12last_modified_time\x18\x06 \x01(\x04*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\x1a\x43\n\rSelectedTrips\x12\x10\n\x08trip_ids\x18\x01 \x03(\t\x12\x10\n\x08shape_id\x18\x02 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"F\n\x0cStopSelector\x12\x15\n\rstop_sequence\x18\x01 \x01(\r\x12\x0f\n\x07stop_id\x18\x02 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90N\"O\n\x0fReplacementStop\x12\x1b\n\x13travel_time_to_stop\x18\x01 \x01(\x05\x12\x0f\n\x07stop_id\x18\x02 \x01(\t*\x06\x08\xe8\x07\x10\xd0\x0f*\x06\x08\xa8\x46\x10\x90NB\x1d\n\x1b\x63om.google.transit.realtime')
-
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'gtfsrt_pb2', _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- _globals['DESCRIPTOR']._loaded_options = None
- _globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.transit.realtime'
- _globals['_TRIPDESCRIPTOR_SCHEDULERELATIONSHIP'].values_by_name["ADDED"]._loaded_options = None
- _globals['_TRIPDESCRIPTOR_SCHEDULERELATIONSHIP'].values_by_name["ADDED"]._serialized_options = b'\010\001'
- _globals['_FEEDMESSAGE']._serialized_start=34
- _globals['_FEEDMESSAGE']._serialized_end=155
- _globals['_FEEDHEADER']._serialized_start=158
- _globals['_FEEDHEADER']._serialized_end=395
- _globals['_FEEDHEADER_INCREMENTALITY']._serialized_start=327
- _globals['_FEEDHEADER_INCREMENTALITY']._serialized_end=379
- _globals['_FEEDENTITY']._serialized_start=398
- _globals['_FEEDENTITY']._serialized_end=751
- _globals['_TRIPUPDATE']._serialized_start=754
- _globals['_TRIPUPDATE']._serialized_end=2280
- _globals['_TRIPUPDATE_STOPTIMEEVENT']._serialized_start=1045
- _globals['_TRIPUPDATE_STOPTIMEEVENT']._serialized_end=1150
- _globals['_TRIPUPDATE_STOPTIMEUPDATE']._serialized_start=1153
- _globals['_TRIPUPDATE_STOPTIMEUPDATE']._serialized_end=2106
- _globals['_TRIPUPDATE_STOPTIMEUPDATE_STOPTIMEPROPERTIES']._serialized_start=1625
- _globals['_TRIPUPDATE_STOPTIMEUPDATE_STOPTIMEPROPERTIES']._serialized_end=2008
- _globals['_TRIPUPDATE_STOPTIMEUPDATE_STOPTIMEPROPERTIES_DROPOFFPICKUPTYPE']._serialized_start=1904
- _globals['_TRIPUPDATE_STOPTIMEUPDATE_STOPTIMEPROPERTIES_DROPOFFPICKUPTYPE']._serialized_end=1992
- _globals['_TRIPUPDATE_STOPTIMEUPDATE_SCHEDULERELATIONSHIP']._serialized_start=2010
- _globals['_TRIPUPDATE_STOPTIMEUPDATE_SCHEDULERELATIONSHIP']._serialized_end=2090
- _globals['_TRIPUPDATE_TRIPPROPERTIES']._serialized_start=2109
- _globals['_TRIPUPDATE_TRIPPROPERTIES']._serialized_end=2264
- _globals['_VEHICLEPOSITION']._serialized_start=2283
- _globals['_VEHICLEPOSITION']._serialized_end=3530
- _globals['_VEHICLEPOSITION_CARRIAGEDETAILS']._serialized_start=2877
- _globals['_VEHICLEPOSITION_CARRIAGEDETAILS']._serialized_end=3094
- _globals['_VEHICLEPOSITION_VEHICLESTOPSTATUS']._serialized_start=3096
- _globals['_VEHICLEPOSITION_VEHICLESTOPSTATUS']._serialized_end=3167
- _globals['_VEHICLEPOSITION_CONGESTIONLEVEL']._serialized_start=3169
- _globals['_VEHICLEPOSITION_CONGESTIONLEVEL']._serialized_end=3294
- _globals['_VEHICLEPOSITION_OCCUPANCYSTATUS']._serialized_start=3297
- _globals['_VEHICLEPOSITION_OCCUPANCYSTATUS']._serialized_end=3514
- _globals['_ALERT']._serialized_start=3533
- _globals['_ALERT']._serialized_end=4920
- _globals['_ALERT_CAUSE']._serialized_start=4390
- _globals['_ALERT_CAUSE']._serialized_end=4606
- _globals['_ALERT_EFFECT']._serialized_start=4609
- _globals['_ALERT_EFFECT']._serialized_end=4830
- _globals['_ALERT_SEVERITYLEVEL']._serialized_start=4832
- _globals['_ALERT_SEVERITYLEVEL']._serialized_end=4904
- _globals['_TIMERANGE']._serialized_start=4922
- _globals['_TIMERANGE']._serialized_end=4977
- _globals['_POSITION']._serialized_start=4979
- _globals['_POSITION']._serialized_end=5092
- _globals['_TRIPDESCRIPTOR']._serialized_start=5095
- _globals['_TRIPDESCRIPTOR']._serialized_end=5662
- _globals['_TRIPDESCRIPTOR_MODIFIEDTRIPSELECTOR']._serialized_start=5375
- _globals['_TRIPDESCRIPTOR_MODIFIEDTRIPSELECTOR']._serialized_end=5505
- _globals['_TRIPDESCRIPTOR_SCHEDULERELATIONSHIP']._serialized_start=5508
- _globals['_TRIPDESCRIPTOR_SCHEDULERELATIONSHIP']._serialized_end=5646
- _globals['_VEHICLEDESCRIPTOR']._serialized_start=5665
- _globals['_VEHICLEDESCRIPTOR']._serialized_end=5956
- _globals['_VEHICLEDESCRIPTOR_WHEELCHAIRACCESSIBLE']._serialized_start=5835
- _globals['_VEHICLEDESCRIPTOR_WHEELCHAIRACCESSIBLE']._serialized_end=5940
- _globals['_ENTITYSELECTOR']._serialized_start=5959
- _globals['_ENTITYSELECTOR']._serialized_end=6135
- _globals['_TRANSLATEDSTRING']._serialized_start=6138
- _globals['_TRANSLATEDSTRING']._serialized_end=6304
- _globals['_TRANSLATEDSTRING_TRANSLATION']._serialized_start=6227
- _globals['_TRANSLATEDSTRING_TRANSLATION']._serialized_end=6288
- _globals['_TRANSLATEDIMAGE']._serialized_start=6307
- _globals['_TRANSLATEDIMAGE']._serialized_end=6500
- _globals['_TRANSLATEDIMAGE_LOCALIZEDIMAGE']._serialized_start=6401
- _globals['_TRANSLATEDIMAGE_LOCALIZEDIMAGE']._serialized_end=6484
- _globals['_SHAPE']._serialized_start=6502
- _globals['_SHAPE']._serialized_end=6569
- _globals['_STOP']._serialized_start=6572
- _globals['_STOP']._serialized_end=7216
- _globals['_STOP_WHEELCHAIRBOARDING']._serialized_start=7133
- _globals['_STOP_WHEELCHAIRBOARDING']._serialized_end=7200
- _globals['_TRIPMODIFICATIONS']._serialized_start=7219
- _globals['_TRIPMODIFICATIONS']._serialized_end=7826
- _globals['_TRIPMODIFICATIONS_MODIFICATION']._serialized_start=7433
- _globals['_TRIPMODIFICATIONS_MODIFICATION']._serialized_end=7741
- _globals['_TRIPMODIFICATIONS_SELECTEDTRIPS']._serialized_start=7743
- _globals['_TRIPMODIFICATIONS_SELECTEDTRIPS']._serialized_end=7810
- _globals['_STOPSELECTOR']._serialized_start=7828
- _globals['_STOPSELECTOR']._serialized_end=7898
- _globals['_REPLACEMENTSTOP']._serialized_start=7900
- _globals['_REPLACEMENTSTOP']._serialized_end=7979
-# @@protoc_insertion_point(module_scope)
diff --git a/proxy_rt_renfe/gtfsrt_pb2.pyi b/proxy_rt_renfe/gtfsrt_pb2.pyi
deleted file mode 100644
index 2d013fb..0000000
--- a/proxy_rt_renfe/gtfsrt_pb2.pyi
+++ /dev/null
@@ -1,577 +0,0 @@
-from google.protobuf.internal import containers as _containers
-from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
-from google.protobuf.internal import python_message as _python_message
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from collections.abc import Iterable as _Iterable, Mapping as _Mapping
-from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
-
-DESCRIPTOR: _descriptor.FileDescriptor
-
-class FeedMessage(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- HEADER_FIELD_NUMBER: _ClassVar[int]
- ENTITY_FIELD_NUMBER: _ClassVar[int]
- header: FeedHeader
- entity: _containers.RepeatedCompositeFieldContainer[FeedEntity]
- def __init__(self, header: _Optional[_Union[FeedHeader, _Mapping]] = ..., entity: _Optional[_Iterable[_Union[FeedEntity, _Mapping]]] = ...) -> None: ...
-
-class FeedHeader(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class Incrementality(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- FULL_DATASET: _ClassVar[FeedHeader.Incrementality]
- DIFFERENTIAL: _ClassVar[FeedHeader.Incrementality]
- FULL_DATASET: FeedHeader.Incrementality
- DIFFERENTIAL: FeedHeader.Incrementality
- GTFS_REALTIME_VERSION_FIELD_NUMBER: _ClassVar[int]
- INCREMENTALITY_FIELD_NUMBER: _ClassVar[int]
- TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
- FEED_VERSION_FIELD_NUMBER: _ClassVar[int]
- gtfs_realtime_version: str
- incrementality: FeedHeader.Incrementality
- timestamp: int
- feed_version: str
- def __init__(self, gtfs_realtime_version: _Optional[str] = ..., incrementality: _Optional[_Union[FeedHeader.Incrementality, str]] = ..., timestamp: _Optional[int] = ..., feed_version: _Optional[str] = ...) -> None: ...
-
-class FeedEntity(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- ID_FIELD_NUMBER: _ClassVar[int]
- IS_DELETED_FIELD_NUMBER: _ClassVar[int]
- TRIP_UPDATE_FIELD_NUMBER: _ClassVar[int]
- VEHICLE_FIELD_NUMBER: _ClassVar[int]
- ALERT_FIELD_NUMBER: _ClassVar[int]
- SHAPE_FIELD_NUMBER: _ClassVar[int]
- STOP_FIELD_NUMBER: _ClassVar[int]
- TRIP_MODIFICATIONS_FIELD_NUMBER: _ClassVar[int]
- id: str
- is_deleted: bool
- trip_update: TripUpdate
- vehicle: VehiclePosition
- alert: Alert
- shape: Shape
- stop: Stop
- trip_modifications: TripModifications
- def __init__(self, id: _Optional[str] = ..., is_deleted: _Optional[bool] = ..., trip_update: _Optional[_Union[TripUpdate, _Mapping]] = ..., vehicle: _Optional[_Union[VehiclePosition, _Mapping]] = ..., alert: _Optional[_Union[Alert, _Mapping]] = ..., shape: _Optional[_Union[Shape, _Mapping]] = ..., stop: _Optional[_Union[Stop, _Mapping]] = ..., trip_modifications: _Optional[_Union[TripModifications, _Mapping]] = ...) -> None: ...
-
-class TripUpdate(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class StopTimeEvent(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- DELAY_FIELD_NUMBER: _ClassVar[int]
- TIME_FIELD_NUMBER: _ClassVar[int]
- UNCERTAINTY_FIELD_NUMBER: _ClassVar[int]
- SCHEDULED_TIME_FIELD_NUMBER: _ClassVar[int]
- delay: int
- time: int
- uncertainty: int
- scheduled_time: int
- def __init__(self, delay: _Optional[int] = ..., time: _Optional[int] = ..., uncertainty: _Optional[int] = ..., scheduled_time: _Optional[int] = ...) -> None: ...
- class StopTimeUpdate(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class ScheduleRelationship(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- SCHEDULED: _ClassVar[TripUpdate.StopTimeUpdate.ScheduleRelationship]
- SKIPPED: _ClassVar[TripUpdate.StopTimeUpdate.ScheduleRelationship]
- NO_DATA: _ClassVar[TripUpdate.StopTimeUpdate.ScheduleRelationship]
- UNSCHEDULED: _ClassVar[TripUpdate.StopTimeUpdate.ScheduleRelationship]
- SCHEDULED: TripUpdate.StopTimeUpdate.ScheduleRelationship
- SKIPPED: TripUpdate.StopTimeUpdate.ScheduleRelationship
- NO_DATA: TripUpdate.StopTimeUpdate.ScheduleRelationship
- UNSCHEDULED: TripUpdate.StopTimeUpdate.ScheduleRelationship
- class StopTimeProperties(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class DropOffPickupType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- REGULAR: _ClassVar[TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType]
- NONE: _ClassVar[TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType]
- PHONE_AGENCY: _ClassVar[TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType]
- COORDINATE_WITH_DRIVER: _ClassVar[TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType]
- REGULAR: TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType
- NONE: TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType
- PHONE_AGENCY: TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType
- COORDINATE_WITH_DRIVER: TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType
- ASSIGNED_STOP_ID_FIELD_NUMBER: _ClassVar[int]
- STOP_HEADSIGN_FIELD_NUMBER: _ClassVar[int]
- PICKUP_TYPE_FIELD_NUMBER: _ClassVar[int]
- DROP_OFF_TYPE_FIELD_NUMBER: _ClassVar[int]
- assigned_stop_id: str
- stop_headsign: str
- pickup_type: TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType
- drop_off_type: TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType
- def __init__(self, assigned_stop_id: _Optional[str] = ..., stop_headsign: _Optional[str] = ..., pickup_type: _Optional[_Union[TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType, str]] = ..., drop_off_type: _Optional[_Union[TripUpdate.StopTimeUpdate.StopTimeProperties.DropOffPickupType, str]] = ...) -> None: ...
- STOP_SEQUENCE_FIELD_NUMBER: _ClassVar[int]
- STOP_ID_FIELD_NUMBER: _ClassVar[int]
- ARRIVAL_FIELD_NUMBER: _ClassVar[int]
- DEPARTURE_FIELD_NUMBER: _ClassVar[int]
- DEPARTURE_OCCUPANCY_STATUS_FIELD_NUMBER: _ClassVar[int]
- SCHEDULE_RELATIONSHIP_FIELD_NUMBER: _ClassVar[int]
- STOP_TIME_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
- stop_sequence: int
- stop_id: str
- arrival: TripUpdate.StopTimeEvent
- departure: TripUpdate.StopTimeEvent
- departure_occupancy_status: VehiclePosition.OccupancyStatus
- schedule_relationship: TripUpdate.StopTimeUpdate.ScheduleRelationship
- stop_time_properties: TripUpdate.StopTimeUpdate.StopTimeProperties
- def __init__(self, stop_sequence: _Optional[int] = ..., stop_id: _Optional[str] = ..., arrival: _Optional[_Union[TripUpdate.StopTimeEvent, _Mapping]] = ..., departure: _Optional[_Union[TripUpdate.StopTimeEvent, _Mapping]] = ..., departure_occupancy_status: _Optional[_Union[VehiclePosition.OccupancyStatus, str]] = ..., schedule_relationship: _Optional[_Union[TripUpdate.StopTimeUpdate.ScheduleRelationship, str]] = ..., stop_time_properties: _Optional[_Union[TripUpdate.StopTimeUpdate.StopTimeProperties, _Mapping]] = ...) -> None: ...
- class TripProperties(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- TRIP_ID_FIELD_NUMBER: _ClassVar[int]
- START_DATE_FIELD_NUMBER: _ClassVar[int]
- START_TIME_FIELD_NUMBER: _ClassVar[int]
- SHAPE_ID_FIELD_NUMBER: _ClassVar[int]
- TRIP_HEADSIGN_FIELD_NUMBER: _ClassVar[int]
- TRIP_SHORT_NAME_FIELD_NUMBER: _ClassVar[int]
- trip_id: str
- start_date: str
- start_time: str
- shape_id: str
- trip_headsign: str
- trip_short_name: str
- def __init__(self, trip_id: _Optional[str] = ..., start_date: _Optional[str] = ..., start_time: _Optional[str] = ..., shape_id: _Optional[str] = ..., trip_headsign: _Optional[str] = ..., trip_short_name: _Optional[str] = ...) -> None: ...
- TRIP_FIELD_NUMBER: _ClassVar[int]
- VEHICLE_FIELD_NUMBER: _ClassVar[int]
- STOP_TIME_UPDATE_FIELD_NUMBER: _ClassVar[int]
- TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
- DELAY_FIELD_NUMBER: _ClassVar[int]
- TRIP_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
- trip: TripDescriptor
- vehicle: VehicleDescriptor
- stop_time_update: _containers.RepeatedCompositeFieldContainer[TripUpdate.StopTimeUpdate]
- timestamp: int
- delay: int
- trip_properties: TripUpdate.TripProperties
- def __init__(self, trip: _Optional[_Union[TripDescriptor, _Mapping]] = ..., vehicle: _Optional[_Union[VehicleDescriptor, _Mapping]] = ..., stop_time_update: _Optional[_Iterable[_Union[TripUpdate.StopTimeUpdate, _Mapping]]] = ..., timestamp: _Optional[int] = ..., delay: _Optional[int] = ..., trip_properties: _Optional[_Union[TripUpdate.TripProperties, _Mapping]] = ...) -> None: ...
-
-class VehiclePosition(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class VehicleStopStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- INCOMING_AT: _ClassVar[VehiclePosition.VehicleStopStatus]
- STOPPED_AT: _ClassVar[VehiclePosition.VehicleStopStatus]
- IN_TRANSIT_TO: _ClassVar[VehiclePosition.VehicleStopStatus]
- INCOMING_AT: VehiclePosition.VehicleStopStatus
- STOPPED_AT: VehiclePosition.VehicleStopStatus
- IN_TRANSIT_TO: VehiclePosition.VehicleStopStatus
- class CongestionLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- UNKNOWN_CONGESTION_LEVEL: _ClassVar[VehiclePosition.CongestionLevel]
- RUNNING_SMOOTHLY: _ClassVar[VehiclePosition.CongestionLevel]
- STOP_AND_GO: _ClassVar[VehiclePosition.CongestionLevel]
- CONGESTION: _ClassVar[VehiclePosition.CongestionLevel]
- SEVERE_CONGESTION: _ClassVar[VehiclePosition.CongestionLevel]
- UNKNOWN_CONGESTION_LEVEL: VehiclePosition.CongestionLevel
- RUNNING_SMOOTHLY: VehiclePosition.CongestionLevel
- STOP_AND_GO: VehiclePosition.CongestionLevel
- CONGESTION: VehiclePosition.CongestionLevel
- SEVERE_CONGESTION: VehiclePosition.CongestionLevel
- class OccupancyStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- EMPTY: _ClassVar[VehiclePosition.OccupancyStatus]
- MANY_SEATS_AVAILABLE: _ClassVar[VehiclePosition.OccupancyStatus]
- FEW_SEATS_AVAILABLE: _ClassVar[VehiclePosition.OccupancyStatus]
- STANDING_ROOM_ONLY: _ClassVar[VehiclePosition.OccupancyStatus]
- CRUSHED_STANDING_ROOM_ONLY: _ClassVar[VehiclePosition.OccupancyStatus]
- FULL: _ClassVar[VehiclePosition.OccupancyStatus]
- NOT_ACCEPTING_PASSENGERS: _ClassVar[VehiclePosition.OccupancyStatus]
- NO_DATA_AVAILABLE: _ClassVar[VehiclePosition.OccupancyStatus]
- NOT_BOARDABLE: _ClassVar[VehiclePosition.OccupancyStatus]
- EMPTY: VehiclePosition.OccupancyStatus
- MANY_SEATS_AVAILABLE: VehiclePosition.OccupancyStatus
- FEW_SEATS_AVAILABLE: VehiclePosition.OccupancyStatus
- STANDING_ROOM_ONLY: VehiclePosition.OccupancyStatus
- CRUSHED_STANDING_ROOM_ONLY: VehiclePosition.OccupancyStatus
- FULL: VehiclePosition.OccupancyStatus
- NOT_ACCEPTING_PASSENGERS: VehiclePosition.OccupancyStatus
- NO_DATA_AVAILABLE: VehiclePosition.OccupancyStatus
- NOT_BOARDABLE: VehiclePosition.OccupancyStatus
- class CarriageDetails(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- ID_FIELD_NUMBER: _ClassVar[int]
- LABEL_FIELD_NUMBER: _ClassVar[int]
- OCCUPANCY_STATUS_FIELD_NUMBER: _ClassVar[int]
- OCCUPANCY_PERCENTAGE_FIELD_NUMBER: _ClassVar[int]
- CARRIAGE_SEQUENCE_FIELD_NUMBER: _ClassVar[int]
- id: str
- label: str
- occupancy_status: VehiclePosition.OccupancyStatus
- occupancy_percentage: int
- carriage_sequence: int
- def __init__(self, id: _Optional[str] = ..., label: _Optional[str] = ..., occupancy_status: _Optional[_Union[VehiclePosition.OccupancyStatus, str]] = ..., occupancy_percentage: _Optional[int] = ..., carriage_sequence: _Optional[int] = ...) -> None: ...
- TRIP_FIELD_NUMBER: _ClassVar[int]
- VEHICLE_FIELD_NUMBER: _ClassVar[int]
- POSITION_FIELD_NUMBER: _ClassVar[int]
- CURRENT_STOP_SEQUENCE_FIELD_NUMBER: _ClassVar[int]
- STOP_ID_FIELD_NUMBER: _ClassVar[int]
- CURRENT_STATUS_FIELD_NUMBER: _ClassVar[int]
- TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
- CONGESTION_LEVEL_FIELD_NUMBER: _ClassVar[int]
- OCCUPANCY_STATUS_FIELD_NUMBER: _ClassVar[int]
- OCCUPANCY_PERCENTAGE_FIELD_NUMBER: _ClassVar[int]
- MULTI_CARRIAGE_DETAILS_FIELD_NUMBER: _ClassVar[int]
- trip: TripDescriptor
- vehicle: VehicleDescriptor
- position: Position
- current_stop_sequence: int
- stop_id: str
- current_status: VehiclePosition.VehicleStopStatus
- timestamp: int
- congestion_level: VehiclePosition.CongestionLevel
- occupancy_status: VehiclePosition.OccupancyStatus
- occupancy_percentage: int
- multi_carriage_details: _containers.RepeatedCompositeFieldContainer[VehiclePosition.CarriageDetails]
- def __init__(self, trip: _Optional[_Union[TripDescriptor, _Mapping]] = ..., vehicle: _Optional[_Union[VehicleDescriptor, _Mapping]] = ..., position: _Optional[_Union[Position, _Mapping]] = ..., current_stop_sequence: _Optional[int] = ..., stop_id: _Optional[str] = ..., current_status: _Optional[_Union[VehiclePosition.VehicleStopStatus, str]] = ..., timestamp: _Optional[int] = ..., congestion_level: _Optional[_Union[VehiclePosition.CongestionLevel, str]] = ..., occupancy_status: _Optional[_Union[VehiclePosition.OccupancyStatus, str]] = ..., occupancy_percentage: _Optional[int] = ..., multi_carriage_details: _Optional[_Iterable[_Union[VehiclePosition.CarriageDetails, _Mapping]]] = ...) -> None: ...
-
-class Alert(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class Cause(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- UNKNOWN_CAUSE: _ClassVar[Alert.Cause]
- OTHER_CAUSE: _ClassVar[Alert.Cause]
- TECHNICAL_PROBLEM: _ClassVar[Alert.Cause]
- STRIKE: _ClassVar[Alert.Cause]
- DEMONSTRATION: _ClassVar[Alert.Cause]
- ACCIDENT: _ClassVar[Alert.Cause]
- HOLIDAY: _ClassVar[Alert.Cause]
- WEATHER: _ClassVar[Alert.Cause]
- MAINTENANCE: _ClassVar[Alert.Cause]
- CONSTRUCTION: _ClassVar[Alert.Cause]
- POLICE_ACTIVITY: _ClassVar[Alert.Cause]
- MEDICAL_EMERGENCY: _ClassVar[Alert.Cause]
- UNKNOWN_CAUSE: Alert.Cause
- OTHER_CAUSE: Alert.Cause
- TECHNICAL_PROBLEM: Alert.Cause
- STRIKE: Alert.Cause
- DEMONSTRATION: Alert.Cause
- ACCIDENT: Alert.Cause
- HOLIDAY: Alert.Cause
- WEATHER: Alert.Cause
- MAINTENANCE: Alert.Cause
- CONSTRUCTION: Alert.Cause
- POLICE_ACTIVITY: Alert.Cause
- MEDICAL_EMERGENCY: Alert.Cause
- class Effect(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- NO_SERVICE: _ClassVar[Alert.Effect]
- REDUCED_SERVICE: _ClassVar[Alert.Effect]
- SIGNIFICANT_DELAYS: _ClassVar[Alert.Effect]
- DETOUR: _ClassVar[Alert.Effect]
- ADDITIONAL_SERVICE: _ClassVar[Alert.Effect]
- MODIFIED_SERVICE: _ClassVar[Alert.Effect]
- OTHER_EFFECT: _ClassVar[Alert.Effect]
- UNKNOWN_EFFECT: _ClassVar[Alert.Effect]
- STOP_MOVED: _ClassVar[Alert.Effect]
- NO_EFFECT: _ClassVar[Alert.Effect]
- ACCESSIBILITY_ISSUE: _ClassVar[Alert.Effect]
- NO_SERVICE: Alert.Effect
- REDUCED_SERVICE: Alert.Effect
- SIGNIFICANT_DELAYS: Alert.Effect
- DETOUR: Alert.Effect
- ADDITIONAL_SERVICE: Alert.Effect
- MODIFIED_SERVICE: Alert.Effect
- OTHER_EFFECT: Alert.Effect
- UNKNOWN_EFFECT: Alert.Effect
- STOP_MOVED: Alert.Effect
- NO_EFFECT: Alert.Effect
- ACCESSIBILITY_ISSUE: Alert.Effect
- class SeverityLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- UNKNOWN_SEVERITY: _ClassVar[Alert.SeverityLevel]
- INFO: _ClassVar[Alert.SeverityLevel]
- WARNING: _ClassVar[Alert.SeverityLevel]
- SEVERE: _ClassVar[Alert.SeverityLevel]
- UNKNOWN_SEVERITY: Alert.SeverityLevel
- INFO: Alert.SeverityLevel
- WARNING: Alert.SeverityLevel
- SEVERE: Alert.SeverityLevel
- ACTIVE_PERIOD_FIELD_NUMBER: _ClassVar[int]
- INFORMED_ENTITY_FIELD_NUMBER: _ClassVar[int]
- CAUSE_FIELD_NUMBER: _ClassVar[int]
- EFFECT_FIELD_NUMBER: _ClassVar[int]
- URL_FIELD_NUMBER: _ClassVar[int]
- HEADER_TEXT_FIELD_NUMBER: _ClassVar[int]
- DESCRIPTION_TEXT_FIELD_NUMBER: _ClassVar[int]
- TTS_HEADER_TEXT_FIELD_NUMBER: _ClassVar[int]
- TTS_DESCRIPTION_TEXT_FIELD_NUMBER: _ClassVar[int]
- SEVERITY_LEVEL_FIELD_NUMBER: _ClassVar[int]
- IMAGE_FIELD_NUMBER: _ClassVar[int]
- IMAGE_ALTERNATIVE_TEXT_FIELD_NUMBER: _ClassVar[int]
- CAUSE_DETAIL_FIELD_NUMBER: _ClassVar[int]
- EFFECT_DETAIL_FIELD_NUMBER: _ClassVar[int]
- active_period: _containers.RepeatedCompositeFieldContainer[TimeRange]
- informed_entity: _containers.RepeatedCompositeFieldContainer[EntitySelector]
- cause: Alert.Cause
- effect: Alert.Effect
- url: TranslatedString
- header_text: TranslatedString
- description_text: TranslatedString
- tts_header_text: TranslatedString
- tts_description_text: TranslatedString
- severity_level: Alert.SeverityLevel
- image: TranslatedImage
- image_alternative_text: TranslatedString
- cause_detail: TranslatedString
- effect_detail: TranslatedString
- def __init__(self, active_period: _Optional[_Iterable[_Union[TimeRange, _Mapping]]] = ..., informed_entity: _Optional[_Iterable[_Union[EntitySelector, _Mapping]]] = ..., cause: _Optional[_Union[Alert.Cause, str]] = ..., effect: _Optional[_Union[Alert.Effect, str]] = ..., url: _Optional[_Union[TranslatedString, _Mapping]] = ..., header_text: _Optional[_Union[TranslatedString, _Mapping]] = ..., description_text: _Optional[_Union[TranslatedString, _Mapping]] = ..., tts_header_text: _Optional[_Union[TranslatedString, _Mapping]] = ..., tts_description_text: _Optional[_Union[TranslatedString, _Mapping]] = ..., severity_level: _Optional[_Union[Alert.SeverityLevel, str]] = ..., image: _Optional[_Union[TranslatedImage, _Mapping]] = ..., image_alternative_text: _Optional[_Union[TranslatedString, _Mapping]] = ..., cause_detail: _Optional[_Union[TranslatedString, _Mapping]] = ..., effect_detail: _Optional[_Union[TranslatedString, _Mapping]] = ...) -> None: ...
-
-class TimeRange(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- START_FIELD_NUMBER: _ClassVar[int]
- END_FIELD_NUMBER: _ClassVar[int]
- start: int
- end: int
- def __init__(self, start: _Optional[int] = ..., end: _Optional[int] = ...) -> None: ...
-
-class Position(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- LATITUDE_FIELD_NUMBER: _ClassVar[int]
- LONGITUDE_FIELD_NUMBER: _ClassVar[int]
- BEARING_FIELD_NUMBER: _ClassVar[int]
- ODOMETER_FIELD_NUMBER: _ClassVar[int]
- SPEED_FIELD_NUMBER: _ClassVar[int]
- latitude: float
- longitude: float
- bearing: float
- odometer: float
- speed: float
- def __init__(self, latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., bearing: _Optional[float] = ..., odometer: _Optional[float] = ..., speed: _Optional[float] = ...) -> None: ...
-
-class TripDescriptor(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class ScheduleRelationship(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- SCHEDULED: _ClassVar[TripDescriptor.ScheduleRelationship]
- ADDED: _ClassVar[TripDescriptor.ScheduleRelationship]
- UNSCHEDULED: _ClassVar[TripDescriptor.ScheduleRelationship]
- CANCELED: _ClassVar[TripDescriptor.ScheduleRelationship]
- REPLACEMENT: _ClassVar[TripDescriptor.ScheduleRelationship]
- DUPLICATED: _ClassVar[TripDescriptor.ScheduleRelationship]
- DELETED: _ClassVar[TripDescriptor.ScheduleRelationship]
- NEW: _ClassVar[TripDescriptor.ScheduleRelationship]
- SCHEDULED: TripDescriptor.ScheduleRelationship
- ADDED: TripDescriptor.ScheduleRelationship
- UNSCHEDULED: TripDescriptor.ScheduleRelationship
- CANCELED: TripDescriptor.ScheduleRelationship
- REPLACEMENT: TripDescriptor.ScheduleRelationship
- DUPLICATED: TripDescriptor.ScheduleRelationship
- DELETED: TripDescriptor.ScheduleRelationship
- NEW: TripDescriptor.ScheduleRelationship
- class ModifiedTripSelector(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- MODIFICATIONS_ID_FIELD_NUMBER: _ClassVar[int]
- AFFECTED_TRIP_ID_FIELD_NUMBER: _ClassVar[int]
- START_TIME_FIELD_NUMBER: _ClassVar[int]
- START_DATE_FIELD_NUMBER: _ClassVar[int]
- modifications_id: str
- affected_trip_id: str
- start_time: str
- start_date: str
- def __init__(self, modifications_id: _Optional[str] = ..., affected_trip_id: _Optional[str] = ..., start_time: _Optional[str] = ..., start_date: _Optional[str] = ...) -> None: ...
- TRIP_ID_FIELD_NUMBER: _ClassVar[int]
- ROUTE_ID_FIELD_NUMBER: _ClassVar[int]
- DIRECTION_ID_FIELD_NUMBER: _ClassVar[int]
- START_TIME_FIELD_NUMBER: _ClassVar[int]
- START_DATE_FIELD_NUMBER: _ClassVar[int]
- SCHEDULE_RELATIONSHIP_FIELD_NUMBER: _ClassVar[int]
- MODIFIED_TRIP_FIELD_NUMBER: _ClassVar[int]
- trip_id: str
- route_id: str
- direction_id: int
- start_time: str
- start_date: str
- schedule_relationship: TripDescriptor.ScheduleRelationship
- modified_trip: TripDescriptor.ModifiedTripSelector
- def __init__(self, trip_id: _Optional[str] = ..., route_id: _Optional[str] = ..., direction_id: _Optional[int] = ..., start_time: _Optional[str] = ..., start_date: _Optional[str] = ..., schedule_relationship: _Optional[_Union[TripDescriptor.ScheduleRelationship, str]] = ..., modified_trip: _Optional[_Union[TripDescriptor.ModifiedTripSelector, _Mapping]] = ...) -> None: ...
-
-class VehicleDescriptor(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class WheelchairAccessible(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- NO_VALUE: _ClassVar[VehicleDescriptor.WheelchairAccessible]
- UNKNOWN: _ClassVar[VehicleDescriptor.WheelchairAccessible]
- WHEELCHAIR_ACCESSIBLE: _ClassVar[VehicleDescriptor.WheelchairAccessible]
- WHEELCHAIR_INACCESSIBLE: _ClassVar[VehicleDescriptor.WheelchairAccessible]
- NO_VALUE: VehicleDescriptor.WheelchairAccessible
- UNKNOWN: VehicleDescriptor.WheelchairAccessible
- WHEELCHAIR_ACCESSIBLE: VehicleDescriptor.WheelchairAccessible
- WHEELCHAIR_INACCESSIBLE: VehicleDescriptor.WheelchairAccessible
- ID_FIELD_NUMBER: _ClassVar[int]
- LABEL_FIELD_NUMBER: _ClassVar[int]
- LICENSE_PLATE_FIELD_NUMBER: _ClassVar[int]
- WHEELCHAIR_ACCESSIBLE_FIELD_NUMBER: _ClassVar[int]
- id: str
- label: str
- license_plate: str
- wheelchair_accessible: VehicleDescriptor.WheelchairAccessible
- def __init__(self, id: _Optional[str] = ..., label: _Optional[str] = ..., license_plate: _Optional[str] = ..., wheelchair_accessible: _Optional[_Union[VehicleDescriptor.WheelchairAccessible, str]] = ...) -> None: ...
-
-class EntitySelector(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- AGENCY_ID_FIELD_NUMBER: _ClassVar[int]
- ROUTE_ID_FIELD_NUMBER: _ClassVar[int]
- ROUTE_TYPE_FIELD_NUMBER: _ClassVar[int]
- TRIP_FIELD_NUMBER: _ClassVar[int]
- STOP_ID_FIELD_NUMBER: _ClassVar[int]
- DIRECTION_ID_FIELD_NUMBER: _ClassVar[int]
- agency_id: str
- route_id: str
- route_type: int
- trip: TripDescriptor
- stop_id: str
- direction_id: int
- def __init__(self, agency_id: _Optional[str] = ..., route_id: _Optional[str] = ..., route_type: _Optional[int] = ..., trip: _Optional[_Union[TripDescriptor, _Mapping]] = ..., stop_id: _Optional[str] = ..., direction_id: _Optional[int] = ...) -> None: ...
-
-class TranslatedString(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class Translation(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- TEXT_FIELD_NUMBER: _ClassVar[int]
- LANGUAGE_FIELD_NUMBER: _ClassVar[int]
- text: str
- language: str
- def __init__(self, text: _Optional[str] = ..., language: _Optional[str] = ...) -> None: ...
- TRANSLATION_FIELD_NUMBER: _ClassVar[int]
- translation: _containers.RepeatedCompositeFieldContainer[TranslatedString.Translation]
- def __init__(self, translation: _Optional[_Iterable[_Union[TranslatedString.Translation, _Mapping]]] = ...) -> None: ...
-
-class TranslatedImage(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class LocalizedImage(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- URL_FIELD_NUMBER: _ClassVar[int]
- MEDIA_TYPE_FIELD_NUMBER: _ClassVar[int]
- LANGUAGE_FIELD_NUMBER: _ClassVar[int]
- url: str
- media_type: str
- language: str
- def __init__(self, url: _Optional[str] = ..., media_type: _Optional[str] = ..., language: _Optional[str] = ...) -> None: ...
- LOCALIZED_IMAGE_FIELD_NUMBER: _ClassVar[int]
- localized_image: _containers.RepeatedCompositeFieldContainer[TranslatedImage.LocalizedImage]
- def __init__(self, localized_image: _Optional[_Iterable[_Union[TranslatedImage.LocalizedImage, _Mapping]]] = ...) -> None: ...
-
-class Shape(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- SHAPE_ID_FIELD_NUMBER: _ClassVar[int]
- ENCODED_POLYLINE_FIELD_NUMBER: _ClassVar[int]
- shape_id: str
- encoded_polyline: str
- def __init__(self, shape_id: _Optional[str] = ..., encoded_polyline: _Optional[str] = ...) -> None: ...
-
-class Stop(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class WheelchairBoarding(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
- __slots__ = ()
- UNKNOWN: _ClassVar[Stop.WheelchairBoarding]
- AVAILABLE: _ClassVar[Stop.WheelchairBoarding]
- NOT_AVAILABLE: _ClassVar[Stop.WheelchairBoarding]
- UNKNOWN: Stop.WheelchairBoarding
- AVAILABLE: Stop.WheelchairBoarding
- NOT_AVAILABLE: Stop.WheelchairBoarding
- STOP_ID_FIELD_NUMBER: _ClassVar[int]
- STOP_CODE_FIELD_NUMBER: _ClassVar[int]
- STOP_NAME_FIELD_NUMBER: _ClassVar[int]
- TTS_STOP_NAME_FIELD_NUMBER: _ClassVar[int]
- STOP_DESC_FIELD_NUMBER: _ClassVar[int]
- STOP_LAT_FIELD_NUMBER: _ClassVar[int]
- STOP_LON_FIELD_NUMBER: _ClassVar[int]
- ZONE_ID_FIELD_NUMBER: _ClassVar[int]
- STOP_URL_FIELD_NUMBER: _ClassVar[int]
- PARENT_STATION_FIELD_NUMBER: _ClassVar[int]
- STOP_TIMEZONE_FIELD_NUMBER: _ClassVar[int]
- WHEELCHAIR_BOARDING_FIELD_NUMBER: _ClassVar[int]
- LEVEL_ID_FIELD_NUMBER: _ClassVar[int]
- PLATFORM_CODE_FIELD_NUMBER: _ClassVar[int]
- stop_id: str
- stop_code: TranslatedString
- stop_name: TranslatedString
- tts_stop_name: TranslatedString
- stop_desc: TranslatedString
- stop_lat: float
- stop_lon: float
- zone_id: str
- stop_url: TranslatedString
- parent_station: str
- stop_timezone: str
- wheelchair_boarding: Stop.WheelchairBoarding
- level_id: str
- platform_code: TranslatedString
- def __init__(self, stop_id: _Optional[str] = ..., stop_code: _Optional[_Union[TranslatedString, _Mapping]] = ..., stop_name: _Optional[_Union[TranslatedString, _Mapping]] = ..., tts_stop_name: _Optional[_Union[TranslatedString, _Mapping]] = ..., stop_desc: _Optional[_Union[TranslatedString, _Mapping]] = ..., stop_lat: _Optional[float] = ..., stop_lon: _Optional[float] = ..., zone_id: _Optional[str] = ..., stop_url: _Optional[_Union[TranslatedString, _Mapping]] = ..., parent_station: _Optional[str] = ..., stop_timezone: _Optional[str] = ..., wheelchair_boarding: _Optional[_Union[Stop.WheelchairBoarding, str]] = ..., level_id: _Optional[str] = ..., platform_code: _Optional[_Union[TranslatedString, _Mapping]] = ...) -> None: ...
-
-class TripModifications(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- class Modification(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- START_STOP_SELECTOR_FIELD_NUMBER: _ClassVar[int]
- END_STOP_SELECTOR_FIELD_NUMBER: _ClassVar[int]
- PROPAGATED_MODIFICATION_DELAY_FIELD_NUMBER: _ClassVar[int]
- REPLACEMENT_STOPS_FIELD_NUMBER: _ClassVar[int]
- SERVICE_ALERT_ID_FIELD_NUMBER: _ClassVar[int]
- LAST_MODIFIED_TIME_FIELD_NUMBER: _ClassVar[int]
- start_stop_selector: StopSelector
- end_stop_selector: StopSelector
- propagated_modification_delay: int
- replacement_stops: _containers.RepeatedCompositeFieldContainer[ReplacementStop]
- service_alert_id: str
- last_modified_time: int
- def __init__(self, start_stop_selector: _Optional[_Union[StopSelector, _Mapping]] = ..., end_stop_selector: _Optional[_Union[StopSelector, _Mapping]] = ..., propagated_modification_delay: _Optional[int] = ..., replacement_stops: _Optional[_Iterable[_Union[ReplacementStop, _Mapping]]] = ..., service_alert_id: _Optional[str] = ..., last_modified_time: _Optional[int] = ...) -> None: ...
- class SelectedTrips(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- TRIP_IDS_FIELD_NUMBER: _ClassVar[int]
- SHAPE_ID_FIELD_NUMBER: _ClassVar[int]
- trip_ids: _containers.RepeatedScalarFieldContainer[str]
- shape_id: str
- def __init__(self, trip_ids: _Optional[_Iterable[str]] = ..., shape_id: _Optional[str] = ...) -> None: ...
- SELECTED_TRIPS_FIELD_NUMBER: _ClassVar[int]
- START_TIMES_FIELD_NUMBER: _ClassVar[int]
- SERVICE_DATES_FIELD_NUMBER: _ClassVar[int]
- MODIFICATIONS_FIELD_NUMBER: _ClassVar[int]
- selected_trips: _containers.RepeatedCompositeFieldContainer[TripModifications.SelectedTrips]
- start_times: _containers.RepeatedScalarFieldContainer[str]
- service_dates: _containers.RepeatedScalarFieldContainer[str]
- modifications: _containers.RepeatedCompositeFieldContainer[TripModifications.Modification]
- def __init__(self, selected_trips: _Optional[_Iterable[_Union[TripModifications.SelectedTrips, _Mapping]]] = ..., start_times: _Optional[_Iterable[str]] = ..., service_dates: _Optional[_Iterable[str]] = ..., modifications: _Optional[_Iterable[_Union[TripModifications.Modification, _Mapping]]] = ...) -> None: ...
-
-class StopSelector(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- STOP_SEQUENCE_FIELD_NUMBER: _ClassVar[int]
- STOP_ID_FIELD_NUMBER: _ClassVar[int]
- stop_sequence: int
- stop_id: str
- def __init__(self, stop_sequence: _Optional[int] = ..., stop_id: _Optional[str] = ...) -> None: ...
-
-class ReplacementStop(_message.Message):
- __slots__ = ()
- Extensions: _python_message._ExtensionDict
- TRAVEL_TIME_TO_STOP_FIELD_NUMBER: _ClassVar[int]
- STOP_ID_FIELD_NUMBER: _ClassVar[int]
- travel_time_to_stop: int
- stop_id: str
- def __init__(self, travel_time_to_stop: _Optional[int] = ..., stop_id: _Optional[str] = ...) -> None: ...
diff --git a/proxy_rt_renfe/main.py b/proxy_rt_renfe/main.py
deleted file mode 100644
index 89c55a0..0000000
--- a/proxy_rt_renfe/main.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# /// script
-# requires-python = ">=3.13"
-# dependencies = [
-# "flask",
-# "protobuf",
-# "requests",
-# ]
-# ///
-
-from flask import Flask, Response
-import requests
-
-from gtfsrt_pb2 import FeedEntity, FeedHeader, FeedMessage, TripDescriptor, TripUpdate
-
-
-def download_rt_json():
- resp = requests.get("https://gtfsrt.renfe.com/trip_updates_LD.json")
-
- return resp.json()
-
-
-def rt_json_to_proto(rt_json):
- header = FeedHeader(
- gtfs_realtime_version=rt_json["header"]["gtfsRealtimeVersion"],
- timestamp=int(rt_json["header"]["timestamp"]),
- )
-
- entities = []
- for entity_json in rt_json["entity"]:
- json_trip_update = entity_json.get("tripUpdate")
- if not json_trip_update:
- print(f"Skipping entity without tripUpdate: {entity_json['id']}")
- continue
-
- if not json_trip_update.get("delay"):
- print(f"Skipping entity without delay: {entity_json['id']}")
- continue
-
- trip_descriptor = TripDescriptor(
- trip_id=json_trip_update["trip"]["tripId"],
- schedule_relationship=TripDescriptor.SCHEDULED,
- )
- stu = TripUpdate.StopTimeUpdate(
- stop_sequence=1,
- arrival=TripUpdate.StopTimeEvent(delay=int(json_trip_update["delay"])),
- departure=TripUpdate.StopTimeEvent(delay=int(json_trip_update["delay"])),
- )
- trip_update = TripUpdate(
- trip=trip_descriptor,
- stop_time_update=[stu],
- delay=int(json_trip_update.get("delay", "0")),
- )
- entity = FeedEntity(id=entity_json["id"], trip_update=trip_update)
- entities.append(entity)
-
- feed = FeedMessage(header=header, entity=entities)
-
- return feed.SerializeToString()
-
-
-app = Flask(__name__)
-
-
-@app.route("/proto", methods=["GET"])
-def proto():
- rt_json = download_rt_json()
- proto_data = rt_json_to_proto(rt_json)
- return Response(proto_data, mimetype="application/x-protobuf")
-
-if __name__ == "__main__":
- app.run(host="localhost", port=5000)
diff --git a/router-config.json b/router-config.json
index ff3877e..dcb45b1 100644
--- a/router-config.json
+++ b/router-config.json
@@ -2,7 +2,12 @@
"updaters": [
{
"type": "stop-time-updater",
- "url": "http://localhost:5000/proto",
+ "url": "https://gtfsrt.renfe.com/trip_updates_LD.pb",
+ "feedId": "renfe"
+ },
+ {
+ "type": "vehicle-positions",
+ "url": "https://gtfsrt.renfe.com/vehicle_positions_LD.pb",
"feedId": "renfe"
}
]