From 24fb00d2684d1715866ccaeacfbdaa6177751d95 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Sep 2021 14:40:56 -0400 Subject: [PATCH 01/28] Add image_url to alert --- gtfs-realtime/proto/gtfs-realtime.proto | 5 +++++ gtfs-realtime/spec/en/reference.md | 1 + 2 files changed, 6 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index eab8577f8..4e4073740 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -634,6 +634,11 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; + // URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. + // The image linked need to be PNG or JPG of less than 500kB. + // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. + optional TranslatedString image_url = 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. diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 383d68012..c46daff39 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -333,6 +333,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | +| **image_url** | [TranslatedString](#message-translatedstring) | Optional | One | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause From b3cb3e5bd3c4c9cff78405a7c58f3cf452713db5 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 8 Sep 2021 14:52:54 -0400 Subject: [PATCH 02/28] Add details about essential information in the image --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 4e4073740..813e17c40 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -634,7 +634,7 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; - // URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. + // URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. // The image linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString image_url = 15; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index c46daff39..cf565a9d8 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -333,7 +333,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image_url** | [TranslatedString](#message-translatedstring) | Optional | One | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image_url** | [TranslatedString](#message-translatedstring) | Optional | One | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause From f183864993c484d3fdfd1bf6c1c0a26c55f24039 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 21 Sep 2021 12:15:08 -0400 Subject: [PATCH 03/28] Add notice about mainly text --- gtfs-realtime/proto/gtfs-realtime.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 813e17c40..3ca596b25 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -635,6 +635,7 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; // URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. + // Image containing mainly text are discouraged. // The image linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString image_url = 15; From 3033eaab731a5057fe6a179a298aeb67445c47c6 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 22 Sep 2021 10:44:46 -0400 Subject: [PATCH 04/28] Update discouraged image list --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 3ca596b25..86a1eb4fa 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -635,7 +635,7 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; // URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. - // Image containing mainly text are discouraged. + // The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. // The image linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. optional TranslatedString image_url = 15; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index cf565a9d8..c9f11b8bb 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -333,7 +333,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image_url** | [TranslatedString](#message-translatedstring) | Optional | One | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image_url** | [TranslatedString](#message-translatedstring) | Optional | One | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause From e2b9e80b460fb7365c43ca137fd86cd5e82ab09a Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 27 Sep 2021 14:47:33 -0400 Subject: [PATCH 05/28] Support list of images --- gtfs-realtime/proto/gtfs-realtime.proto | 4 +- gtfs-realtime/spec/en/reference.md | 89 ++++++++++++++++--------- 2 files changed, 58 insertions(+), 35 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 86a1eb4fa..1833f38e5 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -634,11 +634,11 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; - // URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. + // List of URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. // The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. // The image linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. - optional TranslatedString image_url = 15; + repeated TranslatedString image_url = 15; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index c9f11b8bb..fb2597f89 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -38,38 +38,61 @@ Fields labeled as **experimental** are subject to change and not yet formally ad ## Element Index -* [FeedMessage](#message-feedmessage) - * [FeedHeader](#message-feedheader) - * [Incrementality](#enum-incrementality) - * [FeedEntity](#message-feedentity) - * [TripUpdate](#message-tripupdate) - * [TripDescriptor](#message-tripdescriptor) - * [ScheduleRelationship](#enum-schedulerelationship-1) - * [VehicleDescriptor](#message-vehicledescriptor) - * [StopTimeUpdate](#message-stoptimeupdate) - * [StopTimeEvent](#message-stoptimeevent) - * [ScheduleRelationship](#enum-schedulerelationship) - * [StopTimeProperties](#message-stoptimeproperties) - * [TripProperties](#message-tripproperties) - * [VehiclePosition](#message-vehicleposition) - * [TripDescriptor](#message-tripdescriptor) - * [ScheduleRelationship](#enum-schedulerelationship-1) - * [VehicleDescriptor](#message-vehicledescriptor) - * [Position](#message-position) - * [VehicleStopStatus](#enum-vehiclestopstatus) - * [CongestionLevel](#enum-congestionlevel) - * [OccupancyStatus](#enum-occupancystatus) - * [CarriageDetails](#message-carriagedetails) - * [Alert](#message-alert) - * [TimeRange](#message-timerange) - * [EntitySelector](#message-entityselector) - * [TripDescriptor](#message-tripdescriptor) - * [ScheduleRelationship](#enum-schedulerelationship-1) - * [Cause](#enum-cause) - * [Effect](#enum-effect) - * [TranslatedString](#message-translatedstring) - * [Translation](#message-translation) - * [SeverityLevel](#enum-severitylevel) +- [Elements](#elements) + - [_message_ FeedMessage](#message-feedmessage) + - [Fields](#fields) + - [_message_ FeedHeader](#message-feedheader) + - [Fields](#fields-1) + - [_enum_ Incrementality](#enum-incrementality) + - [Values](#values) + - [_message_ FeedEntity](#message-feedentity) + - [Fields](#fields-2) + - [_message_ TripUpdate](#message-tripupdate) + - [Fields](#fields-3) + - [_message_ StopTimeEvent](#message-stoptimeevent) + - [Fields](#fields-4) + - [_message_ StopTimeUpdate](#message-stoptimeupdate) + - [Fields](#fields-5) + - [_enum_ ScheduleRelationship](#enum-schedulerelationship) + - [Values](#values-1) + - [_message_ StopTimeProperties](#message-stoptimeproperties) + - [Fields](#fields-6) + - [_message_ TripProperties](#message-tripproperties) + - [Fields](#fields-7) + - [_message_ VehiclePosition](#message-vehicleposition) + - [Fields](#fields-8) + - [_enum_ VehicleStopStatus](#enum-vehiclestopstatus) + - [Values](#values-2) + - [_enum_ CongestionLevel](#enum-congestionlevel) + - [Values](#values-3) + - [_enum OccupancyStatus_](#enum-occupancystatus) + - [_Values_](#values-4) + - [_message_ CarriageDetails](#message-carriagedetails) + - [Fields](#fields-9) + - [_message_ Alert](#message-alert) + - [Fields](#fields-10) + - [_enum_ Cause](#enum-cause) + - [Values](#values-5) + - [_enum_ Effect](#enum-effect) + - [Values](#values-6) + - [_enum_ SeverityLevel](#enum-severitylevel) + - [Values](#values-7) + - [_message_ TimeRange](#message-timerange) + - [Fields](#fields-11) + - [_message_ Position](#message-position) + - [Fields](#fields-12) + - [_message_ TripDescriptor](#message-tripdescriptor) + - [Fields](#fields-13) + - [_enum_ ScheduleRelationship](#enum-schedulerelationship-1) + - [Values](#values-8) + - [_message_ VehicleDescriptor](#message-vehicledescriptor) + - [Fields](#fields-14) + - [_message_ EntitySelector](#message-entityselector) + - [Fields](#fields-15) + - [_message_ TranslatedString](#message-translatedstring) + - [Fields](#fields-16) + - [_message_ Translation](#message-translation) + - [Fields](#fields-17) # Elements @@ -333,7 +356,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image_url** | [TranslatedString](#message-translatedstring) | Optional | One | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image_url** | [TranslatedString](#message-translatedstring) | Optional | Many | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause From 36ecabe6bca6ff64bd2a46775c4352fbe8fa6a37 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 27 Sep 2021 14:52:00 -0400 Subject: [PATCH 06/28] Fix typo Co-authored-by: Stefan de Konink --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 1833f38e5..465b670c9 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -634,7 +634,7 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; - // List of URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. + // List of URLs linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. // The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. // The image linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. From a4162ec9300d5d9d3f625d58edc4b67a98635ffa Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 27 Sep 2021 14:55:35 -0400 Subject: [PATCH 07/28] Fix typo Co-authored-by: Stefan de Konink --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 465b670c9..9e862adbb 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -636,7 +636,7 @@ message Alert { // List of URLs linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. // The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. - // The image linked need to be PNG or JPG of less than 500kB. + // The images linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. repeated TranslatedString image_url = 15; From bee0b8d159540f832b85e81478697b19403cab2c Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 27 Sep 2021 16:08:21 -0400 Subject: [PATCH 08/28] Revert table of content --- gtfs-realtime/spec/en/reference.md | 87 +++++++++++------------------- 1 file changed, 32 insertions(+), 55 deletions(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index fb2597f89..f58c71de9 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -38,61 +38,38 @@ Fields labeled as **experimental** are subject to change and not yet formally ad ## Element Index -- [Elements](#elements) - - [_message_ FeedMessage](#message-feedmessage) - - [Fields](#fields) - - [_message_ FeedHeader](#message-feedheader) - - [Fields](#fields-1) - - [_enum_ Incrementality](#enum-incrementality) - - [Values](#values) - - [_message_ FeedEntity](#message-feedentity) - - [Fields](#fields-2) - - [_message_ TripUpdate](#message-tripupdate) - - [Fields](#fields-3) - - [_message_ StopTimeEvent](#message-stoptimeevent) - - [Fields](#fields-4) - - [_message_ StopTimeUpdate](#message-stoptimeupdate) - - [Fields](#fields-5) - - [_enum_ ScheduleRelationship](#enum-schedulerelationship) - - [Values](#values-1) - - [_message_ StopTimeProperties](#message-stoptimeproperties) - - [Fields](#fields-6) - - [_message_ TripProperties](#message-tripproperties) - - [Fields](#fields-7) - - [_message_ VehiclePosition](#message-vehicleposition) - - [Fields](#fields-8) - - [_enum_ VehicleStopStatus](#enum-vehiclestopstatus) - - [Values](#values-2) - - [_enum_ CongestionLevel](#enum-congestionlevel) - - [Values](#values-3) - - [_enum OccupancyStatus_](#enum-occupancystatus) - - [_Values_](#values-4) - - [_message_ CarriageDetails](#message-carriagedetails) - - [Fields](#fields-9) - - [_message_ Alert](#message-alert) - - [Fields](#fields-10) - - [_enum_ Cause](#enum-cause) - - [Values](#values-5) - - [_enum_ Effect](#enum-effect) - - [Values](#values-6) - - [_enum_ SeverityLevel](#enum-severitylevel) - - [Values](#values-7) - - [_message_ TimeRange](#message-timerange) - - [Fields](#fields-11) - - [_message_ Position](#message-position) - - [Fields](#fields-12) - - [_message_ TripDescriptor](#message-tripdescriptor) - - [Fields](#fields-13) - - [_enum_ ScheduleRelationship](#enum-schedulerelationship-1) - - [Values](#values-8) - - [_message_ VehicleDescriptor](#message-vehicledescriptor) - - [Fields](#fields-14) - - [_message_ EntitySelector](#message-entityselector) - - [Fields](#fields-15) - - [_message_ TranslatedString](#message-translatedstring) - - [Fields](#fields-16) - - [_message_ Translation](#message-translation) - - [Fields](#fields-17) +* [FeedMessage](#message-feedmessage) + * [FeedHeader](#message-feedheader) + * [Incrementality](#enum-incrementality) + * [FeedEntity](#message-feedentity) + * [TripUpdate](#message-tripupdate) + * [TripDescriptor](#message-tripdescriptor) + * [ScheduleRelationship](#enum-schedulerelationship-1) + * [VehicleDescriptor](#message-vehicledescriptor) + * [StopTimeUpdate](#message-stoptimeupdate) + * [StopTimeEvent](#message-stoptimeevent) + * [ScheduleRelationship](#enum-schedulerelationship) + * [StopTimeProperties](#message-stoptimeproperties) + * [TripProperties](#message-tripproperties) + * [VehiclePosition](#message-vehicleposition) + * [TripDescriptor](#message-tripdescriptor) + * [ScheduleRelationship](#enum-schedulerelationship-1) + * [VehicleDescriptor](#message-vehicledescriptor) + * [Position](#message-position) + * [VehicleStopStatus](#enum-vehiclestopstatus) + * [CongestionLevel](#enum-congestionlevel) + * [OccupancyStatus](#enum-occupancystatus) + * [CarriageDetails](#message-carriagedetails) + * [Alert](#message-alert) + * [TimeRange](#message-timerange) + * [EntitySelector](#message-entityselector) + * [TripDescriptor](#message-tripdescriptor) + * [ScheduleRelationship](#enum-schedulerelationship-1) + * [Cause](#enum-cause) + * [Effect](#enum-effect) + * [TranslatedString](#message-translatedstring) + * [Translation](#message-translation) + * [SeverityLevel](#enum-severitylevel) # Elements From d9902ebeac9cfde87174956f3edd063d5372fef8 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 20 Oct 2021 12:10:11 -0400 Subject: [PATCH 09/28] Add media type, alt text --- gtfs-realtime/proto/gtfs-realtime.proto | 55 +++++++++++++++++++++++-- gtfs-realtime/spec/en/reference.md | 25 ++++++++++- 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 9e862adbb..a36c738ae 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -634,11 +634,10 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; - // List of URLs linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. + // List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. // The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. - // The images linked need to be PNG or JPG of less than 500kB. // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. - repeated TranslatedString image_url = 15; + repeated TranslatedImage image = 15; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features @@ -898,3 +897,53 @@ message TranslatedString { // 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 meta information +// One of the image 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 TranslatedImage { + message LocalizedImage { + // String containing a fully qualified URL linking to an image + // The image linked needs to be less than 500kB. + required string url = 1; + + // Text describing the appearance of the linked image if the image can't be displayed + // Or the user can't see the image for accessiblity reasons + optional string alternative_text = 2; + + // IANA media type as to specify the type of image to be displayed. + // The type must start with "image/" + required string media_type = 3; + + // 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 = 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; + } + // 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; +} diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index f58c71de9..7ebb8c163 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -333,7 +333,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image_url** | [TranslatedString](#message-translatedstring) | Optional | Many | URL linking to an image to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The image linked need to be PNG or JPG of less than 500kB.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image** | [TranslatedString](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause @@ -506,3 +506,26 @@ A localized string mapped to a language. |------------------|------------|----------------|-------------------|-------------------| | **text** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | A UTF-8 string containing the message. | | **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | + +## _message_ TranslatedImage + +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: If the UI language matches the language code of a translation, the first matching translation is picked. If a default UI language (e.g., English) matches the language code of a translation, the first matching translation is picked. If some translation has an unspecified language code, that translation is picked. + +#### Fields + +| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | +|------------------|------------|----------------|-------------------|-------------------| +| **localized_image** | [LocalizedImage](#message-localizedimage) | Required | Many | At least one localized image must be provided. | + +## _message_ LocalizedImage + +A localized image url mapped to a language. + +#### Fields + +| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | +|------------------|------------|----------------|-------------------|-------------------| +| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked needs to be less than 500kB. | +| **alternative_text** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Text describing the appearance of the linked image if the image can't be displayed or the user can't see the image for accessiblity reasons | +| **media_type** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | IANA media type as to specify the type of image to be displayed. The type must start with "image/" | +| **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | \ No newline at end of file From 401aede7cccdbe5f52fcbcbdd968445854c8fed5 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 26 Oct 2021 15:21:43 -0400 Subject: [PATCH 10/28] Fix URL writing Co-authored-by: Paul Swartz --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index db468f93e..ac82dc777 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -522,7 +522,7 @@ An internationalized message containing per-language versions of a snippet of te ## _message_ LocalizedImage -A localized image url mapped to a language. +A localized image URL mapped to a language. | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| From 3d711b259c7b27df12527a38b0eff0cf0cdfe2b8 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 26 Oct 2021 15:22:04 -0400 Subject: [PATCH 11/28] Fix text reference in TranlatedImage Co-authored-by: Paul Swartz --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index ac82dc777..9c2a832d7 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -510,7 +510,7 @@ A localized string mapped to a language. ## _message_ TranslatedImage -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: If the UI language matches the language code of a translation, the first matching translation is picked. If a default UI language (e.g., English) matches the language code of a translation, the first matching translation is picked. If some translation has an unspecified language code, that translation is picked. +An internationalized message containing per-language versions of an image. One of the images from a message will be picked up. The resolution proceeds as follows: If the UI language matches the language code of a translation, the first matching translation is picked. If a default UI language (e.g., English) matches the language code of a translation, the first matching translation is picked. If some translation has an unspecified language code, that translation is picked. **Caution:** this message is still **experimental**, and subject to change. It may be formally adopted in the future. From 06b17e80174741d7b1b77c91e88d65f1129dce97 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 26 Oct 2021 15:22:18 -0400 Subject: [PATCH 12/28] Fix copy/paste error Co-authored-by: Paul Swartz --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 9c2a832d7..0a1916966 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -336,7 +336,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image** | [TranslatedString](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image** | [TranslatedImage](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause From 6dffdcbf28bc16fa7cc8b236ee06fe7130345106 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 26 Oct 2021 17:10:05 -0400 Subject: [PATCH 13/28] Clarify langage about image selection Co-authored-by: Sean Barbeau --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 8ee62d5c1..656be49cd 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -913,7 +913,7 @@ message TranslatedString { // An internationalized image containing per-language versions of a URL linking to an image // along meta information -// One of the image from a message will be picked up. The resolution proceeds +// 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. From 6c518e173a274066863df08eedaba63c50351c97 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 26 Oct 2021 17:10:37 -0400 Subject: [PATCH 14/28] Clarify alt text description Co-authored-by: Sean Barbeau --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 656be49cd..0ecace526 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -928,8 +928,8 @@ message TranslatedImage { // The image linked needs to be less than 500kB. required string url = 1; - // Text describing the appearance of the linked image if the image can't be displayed - // Or the user can't see the image for accessiblity reasons + // A UTF-8 string describing the appearance of the linked image (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. optional string alternative_text = 2; // IANA media type as to specify the type of image to be displayed. From 3fbbbec77ef6632ce771fdcda09fcd8a1bf5db53 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 26 Oct 2021 17:10:49 -0400 Subject: [PATCH 15/28] Update gtfs-realtime/proto/gtfs-realtime.proto Co-authored-by: Sean Barbeau --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0ecace526..577157ffd 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -912,7 +912,7 @@ message TranslatedString { } // An internationalized image containing per-language versions of a URL linking to an image -// along meta information +// 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, From 49518bc31a7b371740ddd8079fd31f859c304673 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 27 Oct 2021 10:07:41 -0400 Subject: [PATCH 16/28] Use RFC 2119 definition for requirement description Co-authored-by: Sean Barbeau --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 577157ffd..cb24f1f63 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -647,7 +647,7 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; - // List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. + // List of 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. repeated TranslatedImage image = 15; From 124614a306158cb0808b17b614196f486e7fba7b Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 27 Oct 2021 10:11:06 -0400 Subject: [PATCH 17/28] Add missing extension attribute in TranslatedImage --- gtfs-realtime/proto/gtfs-realtime.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index cb24f1f63..0a4d1cf52 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -952,6 +952,14 @@ message TranslatedImage { } // 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, From b76a38b14fb49e45175317641593ee715c649da4 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 3 Nov 2021 09:53:10 -0400 Subject: [PATCH 18/28] Revert editorial changes --- gtfs-realtime/spec/en/reference.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 0a1916966..0ad2eb2c5 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -536,7 +536,9 @@ A localized image URL mapped to a language. Describes the physical path that a vehicle takes when the shape is not part of the (CSV) GTFS, such as for an ad-hoc detour. Shapes belong to Trips and consist of an encoded polyline for more efficient transmission. 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 -**Caution:** this message is still **experimental**, and subject to change. It may be formally adopted in the future. +**Caution:** this message is still **experimental**, and subject to change. It may be formally adopted in the future.
. + +#### Fields | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| From 506b3658d22faa64e8f08da8b17fd4cb51ae3989 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 3 Nov 2021 09:53:55 -0400 Subject: [PATCH 19/28] Revert editorial changes --- gtfs-realtime/spec/en/reference.md | 1 - 1 file changed, 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 0ad2eb2c5..98001073a 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -531,7 +531,6 @@ A localized image URL mapped to a language. | **media_type** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | IANA media type as to specify the type of image to be displayed. The type must start with "image/" | | **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | - ## _message_ Shape Describes the physical path that a vehicle takes when the shape is not part of the (CSV) GTFS, such as for an ad-hoc detour. Shapes belong to Trips and consist of an encoded polyline for more efficient transmission. 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 From 0de4cbc43b257f59f109c2d20852f712192d13cd Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 8 Nov 2021 14:14:10 -0500 Subject: [PATCH 20/28] Max size to 2MB --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0a4d1cf52..cf3d8a75c 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -925,7 +925,7 @@ message TranslatedString { message TranslatedImage { message LocalizedImage { // String containing a fully qualified URL linking to an image - // The image linked needs to be less than 500kB. + // The image linked needs to be less than 2MB. required string url = 1; // A UTF-8 string describing the appearance of the linked image (e.g., in case the image can't be displayed From 1f4fa3970e6b2c6b7e48ed080c3c981c50bff266 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 8 Nov 2021 14:17:01 -0500 Subject: [PATCH 21/28] Add note about URL needing changing if the image changes --- gtfs-realtime/proto/gtfs-realtime.proto | 1 + gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index cf3d8a75c..d160df4e8 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -926,6 +926,7 @@ message TranslatedImage { message LocalizedImage { // String containing a fully qualified URL linking to an image // The image linked needs to 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. required string url = 1; // A UTF-8 string describing the appearance of the linked image (e.g., in case the image can't be displayed diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 98001073a..21f328ec8 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -526,7 +526,7 @@ A localized image URL mapped to a language. | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| -| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked needs to be less than 500kB. | +| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked needs to 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. | | **alternative_text** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Text describing the appearance of the linked image if the image can't be displayed or the user can't see the image for accessiblity reasons | | **media_type** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | IANA media type as to specify the type of image to be displayed. The type must start with "image/" | | **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | From 1b0d6a0def8f60d201809de2d98a74d312843e7d Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 8 Nov 2021 14:17:45 -0500 Subject: [PATCH 22/28] Use MUST for the size limit --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index d160df4e8..4bda65180 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -925,7 +925,7 @@ message TranslatedString { message TranslatedImage { message LocalizedImage { // String containing a fully qualified URL linking to an image - // The image linked needs to be less than 2MB. + // 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. required string url = 1; diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 21f328ec8..91afa1024 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -526,7 +526,7 @@ A localized image URL mapped to a language. | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| -| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked needs to 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. | +| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked must 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. | | **alternative_text** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Text describing the appearance of the linked image if the image can't be displayed or the user can't see the image for accessiblity reasons | | **media_type** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | IANA media type as to specify the type of image to be displayed. The type must start with "image/" | | **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | From ec2d42a540b2fd3df73ced64adca2e9503decc7d Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 8 Nov 2021 14:32:52 -0500 Subject: [PATCH 23/28] Move alternative_text into the parent alert --- gtfs-realtime/proto/gtfs-realtime.proto | 12 ++++++------ gtfs-realtime/spec/en/reference.md | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 4bda65180..3c86f38ee 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -652,6 +652,10 @@ message Alert { // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. repeated 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. + optional TranslatedString image_alternative_text = 16; + // 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. @@ -929,18 +933,14 @@ message TranslatedImage { // 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. required string url = 1; - // A UTF-8 string describing the appearance of the linked image (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. - optional string alternative_text = 2; - // IANA media type as to specify the type of image to be displayed. // The type must start with "image/" - required string media_type = 3; + 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 = 4; + optional string language = 3; // The extensions namespace allows 3rd-party developers to extend the diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 91afa1024..22bb08793 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -337,6 +337,8 @@ An alert, indicating some sort of incident in the public transit network. | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | | **image** | [TranslatedImage](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image_alternative_text** | [TranslatedString](#message-translatedstring) | Optional | One | 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). | + ## _enum_ Cause @@ -527,7 +529,6 @@ A localized image URL mapped to a language. | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| | **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked must 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. | -| **alternative_text** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Text describing the appearance of the linked image if the image can't be displayed or the user can't see the image for accessiblity reasons | | **media_type** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | IANA media type as to specify the type of image to be displayed. The type must start with "image/" | | **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. | From 0899f9f4e7627514090a5d962806c21a5372178f Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Mon, 8 Nov 2021 14:34:08 -0500 Subject: [PATCH 24/28] Add missing experimenal note for image_alternative_text --- gtfs-realtime/proto/gtfs-realtime.proto | 1 + gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 3c86f38ee..d5267b00e 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -654,6 +654,7 @@ message Alert { // 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; // The extensions namespace allows 3rd-party developers to extend the diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 22bb08793..84949e35b 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -337,7 +337,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | | **image** | [TranslatedImage](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | -| **image_alternative_text** | [TranslatedString](#message-translatedstring) | Optional | One | 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). | +| **image_alternative_text** | [TranslatedString](#message-translatedstring) | Optional | One | 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).

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _enum_ Cause From e14376329279754c49074a66e8319504ca23a566 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 9 Nov 2021 15:10:35 -0500 Subject: [PATCH 25/28] Add note about image orderign --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 84949e35b..70a32af6e 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -336,7 +336,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image** | [TranslatedImage](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image** | [TranslatedImage](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. Images must be ordered from the most important to the less important image.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **image_alternative_text** | [TranslatedString](#message-translatedstring) | Optional | One | 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).

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | From 56fa28dbb2fa26363c99e19d4c12990a6034380c Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Fri, 12 Nov 2021 09:26:20 -0500 Subject: [PATCH 26/28] Only allow one image --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index d5267b00e..610949465 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -647,10 +647,10 @@ message Alert { optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY]; - // List of 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. + // 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. - repeated TranslatedImage image = 15; + 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. diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 70a32af6e..2245fa407 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -336,7 +336,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image** | [TranslatedImage](#message-translatedimage) | Optional | Many | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information. Images must be ordered from the most important to the less important image.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image** | [TranslatedImage](#message-translatedimage) | Optional | One | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **image_alternative_text** | [TranslatedString](#message-translatedstring) | Optional | One | 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).

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | From 1274fadcca05a7b29ee78aad640ee9f0fd0b9ea7 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Fri, 12 Nov 2021 09:39:16 -0500 Subject: [PATCH 27/28] Fix image text --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 2245fa407..467e610f9 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -336,7 +336,7 @@ An alert, indicating some sort of incident in the public transit network. | **tts_header_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as header_text but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **tts_description_text** | [TranslatedString](#message-translatedstring) | Optional | One | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | | **severity_level** | [SeverityLevel](#enum-severitylevel) | Optional | One | Severity of the alert. | -| **image** | [TranslatedImage](#message-translatedimage) | Optional | One | List of TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **image** | [TranslatedImage](#message-translatedimage) | Optional | One | TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image should enhance the understanding of the alert and must not be the only location of essential information. The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **image_alternative_text** | [TranslatedString](#message-translatedstring) | Optional | One | 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).

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | From df127da1d123c06eaf4762f6ec5c40a49029afd3 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Tue, 23 Nov 2021 10:40:01 -0500 Subject: [PATCH 28/28] Add mention of URL escaping, mirroring the one in GTFS static --- gtfs-realtime/proto/gtfs-realtime.proto | 3 ++- gtfs-realtime/spec/en/reference.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 610949465..7672a94ba 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -929,9 +929,10 @@ message TranslatedString { // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. message TranslatedImage { message LocalizedImage { - // String containing a fully qualified URL linking to an image + // 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. diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 467e610f9..4a176e873 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -528,7 +528,7 @@ A localized image URL mapped to a language. | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | |------------------|------------|----------------|-------------------|-------------------| -| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing a fully qualified URL linking to an image. The image linked must 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. | +| **url** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | String containing an URL linking to an image. The image linked must 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. | | **media_type** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | IANA media type as to specify the type of image to be displayed. The type must start with "image/" | | **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. |