Skip to content

OTM API

Introduction

This product contains situation data from NDW's situation message feed. The situations have been transformed from DATEXII to OTM. The situation messages feed contains situations regarding roadworks, speed and lane and traffic management at specific times. This product contains current and future situations, up to one week in the future, in OTM format.

Structure and content

The following classes in the diagram may appear in the supplied data. Specific explanations about the OTM format can be found on the official documentation website. Class diagram of possible classes in the provided data

OTM Constraints

OTM works route based. A route contains information about location, time and other constraints. DATEXII situations are converted to OTM routes with constraints. Routes for which the location and time constraints are the same are included in the combined route. Combinations of different constraints are possible.

The following constraints, defined in the OTM specification, may exist in this product:

  • TimeWindowConstraint: Constraint on time. Used in combination with other constraints to indicate when they apply.
  • VehicleTypeConstraint: Constraint on vehicle type.
  • ValueBoundConstraint: Constraint on speed, weight and other values.
  • AndConstraint: Combining multiple constraints.
  • OrConstraint: Only used when there are restrictions with multiple time windows.
  • GenericConstraint: Used to indicate road/lane closure as part of the description.

No other constraints in OTM have been used.

Examples

Speed ​​limitation on a given stretch of road with a time window.
{
  "constraint": {
      "associationType": "inline",
      "entity": {
          "value": {
              "and": [
                  {
                      "endTime": "2023-11-14T15:15:00Z",
                      "startTime": "2022-12-14T05:30:00Z",
                      "type": "timeWindowConstraint"
                  },
                  {
                      "constraintType": "maximum",
                      "description": "Max. speed 30 km/h",
                      "maximum": {
                          "unit": "km/h",
                          "value": 30.0
                      },
                      "type": "valueBoundConstraint",
                      "valueType": "speed"
                  }
              ],
              "type": "andConstraint"
          }
      }
  },
  "creationDate": "2022-12-15T15:11:20.669Z",
  "geoReferences": {
      "geometry": {
          "coordinates": [
              [
                  4.710488,
                  52.293814
              ],
              ...
          ],
          "type": "LineString"
      },
      "type": "Feature"
  },
  "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "lastModified": "2022-12-15T15:14:36.733Z"
}
Speed ​​limitation on a given stretch of road with multiple time windows.
{
  "constraint": {
      "associationType": "inline",
      "entity": {
          "value": {
              "and": [
                  {
                      "or": [
                          {
                              "endTime": "2023-11-14T15:15:00Z",
                              "startTime": "2022-12-14T05:30:00Z",
                              "type": "timeWindowConstraint"
                          },
                          {
                              "endTime": "2023-11-15T15:15:00Z",
                              "startTime": "2022-12-15T05:30:00Z",
                              "type": "timeWindowConstraint"
                          }
                      ]
                  },
                  {
                      "constraintType": "maximum",
                      "description": "Max. speed 30 km/h",
                      "maximum": {
                          "unit": "km/h",
                          "value": 30.0
                      },
                      "type": "valueBoundConstraint",
                      "valueType": "speed"
                  }
              ],
              "type": "andConstraint"
          }
      }
  },
  "creationDate": "2022-12-15T15:11:20.669Z",
  "geoReferences": {
      "geometry": {
          "coordinates": [
              [
                  4.710488,
                  52.293814
              ],
              ...
          ],
          "type": "LineString"
      },
      "type": "Feature"
  },
  "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  "lastModified": "2022-12-15T15:14:36.733Z"
}
Road closed to all types of vehicles on a time window.
{
    "constraint": {
        "associationType": "inline",
        "entity": {
            "value": {
                "and": [
                    {
                        "endTime": "2023-04-26T15:00:00Z",
                        "startTime": "2023-01-23T07:00:00Z",
                        "type": "timeWindowConstraint"
                    },
                    {
                        "description": "closed",
                        "type": "genericConstraint"
                    }
                ],
                "type": "andConstraint"
            }
        }
    },
    "creationDate": "2023-01-05T08:53:32Z",
    "geoReferences": {
        "geometry": {
            "coordinates": [
                [
                    6.921372,
                    52.312493
                ],
                ...
            ],
            "type": "LineString"
        },
        "type": "Feature"
    },
    "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "lastModified": "2023-01-23T07:03:51Z"
}
Road closed to certain types of vehicles on a time window.
{
    "constraint": {
        "associationType": "inline",
        "entity": {
            "value": {
                "and": [
                    {
                        "endTime": "2023-02-17T10:00:00Z",
                        "startTime": "2023-02-17T08:00:00Z",
                        "type": "timeWindowConstraint"
                    },
                    {
                        "type": "vehicleTypeConstraint",
                        "vehicleTypes": [
                            "car",
                            "carWithTrailer",
                            "motorcycle",
                            "motorscooter",
                            "van",
                            "lorry",
                            "bus",
                            "constructionOrMaintenanceVehicle",
                            "moped",
                            "agriculturalVehicle"
                        ]
                    },
                    {
                        "description": "closed",
                        "type": "genericConstraint"
                    }
                ],
                "type": "andConstraint"
            }
        }
    },
    "creationDate": "2023-02-17T08:00:02.712Z",
    "geoReferences": {
        "geometry": {
            "coordinates": [
                [
                    5.074835,
                    51.626959
                ],
                ...
            ],
            "type": "LineString"
        },
        "type": "Feature"
    },
    "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "lastModified": "2023-02-17T10:00:00.638Z"
}
Go back to the previous page