|
|
The **use case7** is dedicated to the publication of areas in which a speed lower than the maximum speed of the road is recommended.
|
|
|
This use case is deprecated.
|
|
|
|
|
|
To guarantee the correct operation of the use case, capturing the information of _x,y_ dynamics that arrive at the platform will be tried in order to detect possible congestion zones.
|
|
|
~~The **use case7** is dedicated to the publication of areas in which a speed lower than the maximum speed of the road is recommended.~~
|
|
|
|
|
|
This _x,y_ information will be used to validate information from other use cases, to provide and disseminate recommended speeds and to feed the traffic management information systems of the Dirección General de Tráfico. In any case, this information will always be dissociated and anonymised, so that there will never be any record of the vehicle or driver that is generating this information.
|
|
|
~~To guarantee the correct operation of the use case, capturing the information of _x,y_ dynamics that arrive at the platform will be tried in order to detect possible congestion zones.~~
|
|
|
|
|
|
Since the current state of the vehicles does not allow a sufficiently representative data sample to be obtained, this dynamic _x,y_ information is obtained through third-party providers. These providers provide traffic information in real time, using this information, the use case performs the necessary calculations to publish the information on recommended speeds in the areas affected by congestion.
|
|
|
~~This _x,y_ information will be used to validate information from other use cases, to provide and disseminate recommended speeds and to feed the traffic management information systems of the Dirección General de Tráfico. In any case, this information will always be dissociated and anonymised, so that there will never be any record of the vehicle or driver that is generating this information.~~
|
|
|
|
|
|
The platform, unlike other use cases, only has the functionality of **subscription (reception)** of information. This is done through a REST API service, which is described later.
|
|
|
~~Since the current state of the vehicles does not allow a sufficiently representative data sample to be obtained, this dynamic _x,y_ information is obtained through third-party providers. These providers provide traffic information in real time, using this information, the use case performs the necessary calculations to publish the information on recommended speeds in the areas affected by congestion.~~
|
|
|
|
|
|
The aforementioned reception functionality requires an access certificate, which must be requested and supplied by DGT 3.0. This certificate, if it has not already been requested, must be requested from [_soporte@cmobility30.es_](mailto:soporte@cmobility30.es).
|
|
|
~~The platform, unlike other use cases, only has the functionality of **subscription (reception)** of information. This is done through a REST API service, which is described later.~~
|
|
|
|
|
|
Below are the URLs to access the functionalities of the use case.
|
|
|
~~The aforementioned reception functionality requires an access certificate, which must be requested and supplied by DGT 3.0. This certificate, if it has not already been requested, must be requested from [_soporte@cmobility30.es_](mailto:soporte@cmobility30.es).~~
|
|
|
|
|
|
~~Below are the URLs to access the functionalities of the use case.~~
|
|
|
| Mode | URL | Description |
|
|
|
|------|-----|-------------|
|
|
|
| Subscription | <https://pre.cmobility30.es/use-case-7> | Integration environment endpoint for subscription |
|
|
|
|
|
|
## Subscription
|
|
|
## ~~Subscription~~
|
|
|
|
|
|
This use case has a behavior similar to that offered by Bandeja de Salida that can be found in [use case 4. Virtual message board.](https://gitlab.cs.cmobility30.es/dgt3.0_eng/use-case-4) The API offers an endpoint through which the information on recommended speeds on the different roads and highways is published. This endpoint is shown below and must be accessed by making a _GET_ type request. This request requires meeting the general preconditions described in [General · (cmobility30.es)](https://gitlab.cs.cmobility30.es/dgt3.0_eng/general/-/wikis/home).
|
|
|
~~This use case has a behavior similar to that offered by Bandeja de Salida that can be found in [use case 4. Virtual message board.](https://gitlab.cs.cmobility30.es/dgt3.0_eng/use-case-4) The API offers an endpoint through which the information on recommended speeds on the different roads and highways is published. This endpoint is shown below and must be accessed by making a _GET_ type request. This request requires meeting the general preconditions described in [General · (cmobility30.es)](https://gitlab.cs.cmobility30.es/dgt3.0_eng/general/-/wikis/home).~~
|
|
|
|
|
|
> {baseUrl}/v1/events
|
|
|
> ~~{baseUrl}/v1/events~~
|
|
|
|
|
|
Recommended speeds are published on the endpoint in JSON format. Here an example is shown:
|
|
|
~~Recommended speeds are published on the endpoint in JSON format. Here an example is shown:~~
|
|
|
```json
|
|
|
[
|
|
|
{
|
... | ... | @@ -105,25 +107,25 @@ Recommended speeds are published on the endpoint in JSON format. Here an example |
|
|
]
|
|
|
```
|
|
|
|
|
|
Below is a description of each of the fields in the above JSON. This JSON publishes the information on a specific congestion as well as the recommended speeds at different points:
|
|
|
~~Below is a description of each of the fields in the above JSON. This JSON publishes the information on a specific congestion as well as the recommended speeds at different points:~~
|
|
|
|
|
|
The document publishes a list of affected roads where there is a traffic jam, each of which is made up of a field **_properties_** and **_recommendedSpeeds_**. That is, each set of these two fields refers to a different road with different speed recommendations.
|
|
|
~~The document publishes a list of affected roads where there is a traffic jam, each of which is made up of a field **_properties_** and **_recommendedSpeeds_**. That is, each set of these two fields refers to a different road with different speed recommendations.~~
|
|
|
|
|
|
- **Properties:** It contains information relative to the affected area.
|
|
|
- **Lat:** Latitude where the jam starts.
|
|
|
- **Lon:** Longitude where the jam starts.
|
|
|
- **Timestamp(UTC Date)**: Date and time in UTC format of the moment in which the information was updated. It may not match the current date and time.
|
|
|
- **Vialidad.**
|
|
|
- **RoadDescription:** Name of the road or roads that are affected.
|
|
|
- **Direction:** The direction of the road on which the algorithm is applied. It can have values 1 (Ascending) or 0 (Descending).
|
|
|
- **AffectedLength:** Length, in meters, of the section in which there is currently a retention. The greater this distance, the greater the distance between recommended speeds.
|
|
|
- **RoadMaxSpeed:** Maximum speed of the track, in Km/h.
|
|
|
- **RecommendedSpeeds:** It contains the recommended speeds in the different sections.
|
|
|
- **Speed:** Recommended speed.
|
|
|
- **kmStart:** Starting point of the recommendation zone. Represents the distance from the point of origin at which the advisory speed zone begins.
|
|
|
- **kmEnd:** End point of the recommendation zone. Represents the distance from the point of origin at which the advisory speed zone ends.
|
|
|
- ~~**Properties:** It contains information relative to the affected area.~~
|
|
|
- ~~**Lat:** Latitude where the jam starts.~~
|
|
|
- ~~**Lon:** Longitude where the jam starts.~~
|
|
|
- ~~**Timestamp(UTC Date)**: Date and time in UTC format of the moment in which the information was updated. It may not match the current date and time.~~
|
|
|
- ~~**Vialidad.**~~
|
|
|
- ~~**RoadDescription:** Name of the road or roads that are affected.~~
|
|
|
- ~~**Direction:** The direction of the road on which the algorithm is applied. It can have values 1 (Ascending) or 0 (Descending).~~
|
|
|
- ~~**AffectedLength:** Length, in meters, of the section in which there is currently a retention. The greater this distance, the greater the distance between recommended speeds.~~
|
|
|
- ~~**RoadMaxSpeed:** Maximum speed of the track, in Km/h.~~
|
|
|
- ~~**RecommendedSpeeds:** It contains the recommended speeds in the different sections.~~
|
|
|
- ~~**Speed:** Recommended speed.~~
|
|
|
- ~~**kmStart:** Starting point of the recommendation zone. Represents the distance from the point of origin at which the advisory speed zone begins.~~
|
|
|
- ~~**kmEnd:** End point of the recommendation zone. Represents the distance from the point of origin at which the advisory speed zone ends.~~
|
|
|
|
|
|
Taking into consideration the previous fields, an example JSON is shown below along with its interpretation:
|
|
|
~~Taking into consideration the previous fields, an example JSON is shown below along with its interpretation:~~
|
|
|
|
|
|
|
|
|
```json
|
... | ... | @@ -141,11 +143,11 @@ Taking into consideration the previous fields, an example JSON is shown below al |
|
|
]
|
|
|
```
|
|
|
|
|
|
From the point where the traffic jam originates, let us remember that it is given by the fields _lat_ and _lng_, (let us suppose that the road coincides with kilometer point 200) up to kilometer point 212.4, the cars must circulate at a speed of 40km/h. From kilometer point 212.4 to 227.28, cars must travel at 50 km/h. And so on until reaching 90 km/h, which in this example is the maximum speed of the road.
|
|
|
~~From the point where the traffic jam originates, let us remember that it is given by the fields _lat_ and _lng_, (let us suppose that the road coincides with kilometer point 200) up to kilometer point 212.4, the cars must circulate at a speed of 40km/h. From kilometer point 212.4 to 227.28, cars must travel at 50 km/h. And so on until reaching 90 km/h, which in this example is the maximum speed of the road.~~
|
|
|
|
|
|
## Errors
|
|
|
## ~~Errors~~
|
|
|
|
|
|
All HTTP responses other than **200 – OK**, can be considered **invalid**. Regardless of the error message, the response format is like the following example:
|
|
|
~~All HTTP responses other than **200 – OK**, can be considered **invalid**. Regardless of the error message, the response format is like the following example:~~
|
|
|
|
|
|
```json
|
|
|
{
|
... | ... | @@ -155,17 +157,17 @@ All HTTP responses other than **200 – OK**, can be considered **invalid**. Reg |
|
|
}
|
|
|
```
|
|
|
|
|
|
Information regarding errors in this use case can be found here. These errors will have three main categories:
|
|
|
~~Information regarding errors in this use case can be found here. These errors will have three main categories:~~
|
|
|
|
|
|
#### Authentication Errors
|
|
|
#### ~~Authentication Errors~~
|
|
|
|
|
|
- HTTP Status: **401 - Unauthorized**
|
|
|
- ~~HTTP Status: **401 - Unauthorized**~~
|
|
|
| Code | Message |
|
|
|
|------|---------|
|
|
|
| 1 | User not found or valid |
|
|
|
|
|
|
|
|
|
#### Client Errors
|
|
|
#### ~~Client Errors~~
|
|
|
|
|
|
- HTTP Status: **400 - Bad Request**
|
|
|
| Code | Message |
|
... | ... | @@ -182,7 +184,7 @@ Information regarding errors in this use case can be found here. These errors wi |
|
|
| 10 | There is an error in one or more elements |
|
|
|
|
|
|
|
|
|
Below is a response of _error 5 - Expired token received_ which will have the following format:
|
|
|
~~Below is a response of _error 5 - Expired token received_ which will have the following format:~~
|
|
|
|
|
|
```json
|
|
|
{
|
... | ... | @@ -193,9 +195,9 @@ Below is a response of _error 5 - Expired token received_ which will have the fo |
|
|
|
|
|
```
|
|
|
|
|
|
#### Server Errors
|
|
|
#### ~~Server Errors~~
|
|
|
|
|
|
- HTTP Status: **500 - Internal Server Error**
|
|
|
- ~~HTTP Status: **500 - Internal Server Error**~~
|
|
|
| Code | Message |
|
|
|
|------|---------|
|
|
|
| 28 | Internal error |
|
... | ... | |