I. Abstract
TODO
II. Keywords
The following are keywords to be used by search engines and document catalogues.
ogcdoc, OGC document, OpenAPI, REST, feature, API, system, smart system, connected system, IoT, sensorweb, ssn, sensor, actuator, transducer, sampling, platform, robot, drone, unmanned, autonomous, observation, measurement, datastream, command, control, trajectory, dynamic
III. Preface
TODO
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.
Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.
IV. Security considerations
No security considerations have been made for this Standard.
V. Submitting Organizations
The following organizations submitted this Document to the Open Geospatial Consortium (OGC):
- GeoRobotix, Inc.
- Botts Innovative Research, Inc.
- Cesium GS, Inc.
- 52° North Initiative for Geospatial Open Source Software GmbH
- Pelagis Data Solutions
- National Geospatial-Intelligence Agency (NGA)
VI. Submitters
All questions regarding this submission should be directed to the editor or the submitters:
Name | Affiliation |
Alexandre Robin | GeoRobotix, Inc. |
Mike Botts | Botts Innovative Research, Inc. |
VII. Contributors
Additional contributors to this Standard include the following:
Name | Affiliation |
Chris Tucker | GeoRobotix, Inc. |
Nick Garay | Botts Innovative Research, Inc. |
Christian Autermann | 52° North Initiative |
Glenn Laughlin | Pelagis Data Solutions |
Chuck Heazel | Heazeltech |
OGC API - Connected Systems - Part 2: Dynamic Data
1. Scope
This standard defines extensions to OGC API — Features for exposing dynamic data flowing to and from observing systems and platforms. This standard also complies with OGC API — Common.
The API provides an actionnable implementation of concepts defined in the Semantic Sensor Network Ontology (SSN).
More specifically, Part 2 of the API implements additional SSN concepts (namely Observation, Actuation, Result and Sample).
The following types of resources are made availables through this API:
Datastream
Observation
Control Stream
Command
Command Status
System Event
Resource Events
2. Conformance
This standard has been written to be compliant with the OGC Specification Model – A Standard for Modular Specification (OGC 08-131r3). Extensions of this standard shall themselves be conformant to the OGC Specification Model.
Conformance with this specification shall be checked using all the relevant tests specified in Annex A. The framework, concepts, and methodology for testing, and the criteria to be achieved to claim conformance are specified in ISO 19105: Geographic information — Conformance and Testing. In order to conform to this OGC™ encoding standard, a standardization target shall implement the core conformance class, and choose to implement any one of the other conformance classes.
This standard defines XXXX.
Requirements for N standardization target types are considered:
AAAA
BBBB
Conformance with this standard shall be checked using all the relevant tests specified in Annex A (normative) of this document. The framework, concepts, and methodology for testing, and the criteria to be achieved to claim conformance are specified in the OGC Compliance Testing Policies and Procedures and the OGC Compliance Testing web site.
In order to conform to this OGC® interface standard, a software implementation shall choose to implement:
Any one of the conformance levels specified in Annex A (normative).
Any one of the Distributed Computing Platform profiles specified in Annexes TBD through TBD (normative).
All requirements-classes and conformance-classes described in this document are owned by the standard(s) identified.
3. Normative references
The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.
The Specification Model – A Standard for Modular Specification
OGC API — Connected Systems — Part 1: Feature Resources, version 1.0, https://docs.ogc.org/DRAFTS/23-001.html
OGC API — Features — Part 4: Create, Replace, Update and Delete, version 1.0.0-DRAFT. https://docs.ogc.org/DRAFTS/20-002.html
OGC API — Common — Part 1: Core, version 1.0.0. https://docs.ogc.org/DRAFTS/19-072.html
OGC API — Common — Part 2: Geospatial Data, version 0.0.9. https://docs.ogc.org/DRAFTS/20-024.html
OGC SensorML: Model and XML Encoding Standard, version 2.1
OGC SensorML: JSON Encoding Standard, version 1.0, https://docs.ogc.org/DRAFTS/23-000.html
OGC SWE Common Data Model Encoding Standard, version 2.1. https://docs.ogc.org/DRAFTS/08-094r2.html
ISO: ISO 8601:2019, Date and time — Representations for information interchange — Part 1: Basic rules. International Organization for Standardization, Geneva (2019). .. ISO (2019).
ISO: ISO 8601:2019, Date and time — Representations for information interchange — Part 2: Extensions. International Organization for Standardization, Geneva (2019). .. ISO (2019).
T. Bray (ed.): IETF RFC 8259, The JavaScript Object Notation (JSON) Data Interchange Format. RFC Publisher (2017). https://www.rfc-editor.org/info/rfc8259.
M. Nottingham: IETF RFC 8288, Web Linking. RFC Publisher (2017). https://www.rfc-editor.org/info/rfc8288.
JSON Schema Validation: A Vocabulary for Structural Validation of JSON, Version 2020-12, https://json-schema.org/draft/2020-12/json-schema-validation.html
The WebSocket Protocol, December 2011, Proposed Standard. https://www.rfc-editor.org/rfc/rfc6455
MQTT Version 5.0, 07 March 2019, OASIS Standard. http://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html
4. Terms and definitions
This document uses the terms defined in OGC Policy Directive 49, which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this document and OGC documents do not use the equivalent phrases in the ISO/IEC Directives, Part 2.
This document also uses terms defined in the OGC Standard for Modular specifications (OGC 08-131r3), also known as the ‘ModSpec’. The definitions of terms such as standard, specification, requirement, and conformance test are provided in the ModSpec.
For the purposes of this document, the following additional terms and definitions apply.
This document uses the terms defined in Sub-clause 5.3 of [OGC06-121r9], which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this standard.
For the purposes of this document, the following additional terms and definitions apply.
TODO
4.1. Application Programming Interface (API)
a formally defined set of types and methods which establish a contract between client code which uses the API and implementation code which provides the API
4.2. Connected Systems
Collections of interrelated systems consisting of information technology (IT) devices, sensors, and actuators that can seamlessly interact.
4.3. Feature
Abstraction of real-world phenomena
[SOURCE: ISO-19101, definition 4.11]
4.4. Observation
Act of observing a property
[SOURCE: ISO-19156, definition 4.10]
4.5. Observation Procedure
Method, algorithm or instrument, or system of these which may be used in making an observation
Note: In the context of the sensor web, an observation procedure is often composed of one or more sensors that transform a real world phenomenon into digital information, plus additional processing steps.
[SOURCE: ISO-19156, definition 4.11]
4.6. Property
Facet or attribute of an object referenced by a name Example : Abby’s car has the colour red, where “colour red” is a property of the car instance
[SOURCE: ISO-19143]
4.7. Sensor
Type of observation procedure that provides the estimated value of an observed property at its output Note: A sensor uses a combination of physical, chemical or biological means in order to estimate the underlying observed property. At the end of the measuring chain electronic devices often produce signals to be processed
4.8. Sensor Network
A collection of sensors and processing nodes, in which information on properties observed by the sensors may be transferred and processed Note: A particular type of a sensor network is an ad hoc sensor network.
4.9. Sensor Data
List of digital values produced by a sensor that represents estimated values of one or more observed properties of one or more features Note: Sensor data is usually available in the form of data streams or computer files.
4.10. Sensor Related Data
List of digital values produced by a sensor that contains auxiliary information that is not directly related to the value of observed properties Example: sensor status, quality of measure, quality of service, etc… When such data is measured, it is sometimes considered sensor data as well.
4.11. Data Component
Element of sensor data definition corresponding to an atomic or aggregate data type Note: A data component is a part of the overall dataset definition. The dataset structure can then be seen as a hierarchical tree of data components.
5. Conventions
This sections provides details and examples for any conventions used in the document. Examples of conventions are symbols, abbreviations, use of XML schema, or special notes regarding how to read the document.
5.1. Identifiers
The normative provisions in this standard are denoted by the URI
http://www.opengis.net/spec/ogcapi-connectedsystems-1/1.0
All requirements and conformance tests that appear in this document are denoted by partial URIs which are relative to this base.
5.2. Abbreviated terms
In this document the following abbreviations and acronyms are used or introduced:
API: Application Programming Interface
CRS: Coordinate Reference System
CSML: Climate Science Modeling Language
GPS: Global Positioning System
ISO: International Organization for Standardization
MISB: Motion Imagery Standards Board
OGC: Open Geospatial Consortium
SAS: Sensor Alert Service
SensorML: Sensor Model Language
SI: Système International (International System of Units)
SOS: Sensor Observation Service
SPS: Sensor Planning Service
SWE: Sensor Web Enablement
TAI: Temps Atomique International (International Atomic Time)
UML: Unified Modeling Language
UTC: Coordinated Universal Time
XML: eXtended Markup Language
1D: One Dimensional
2D: Two Dimensional
3D: Three Dimensional
6. Overview
6.1. General
All resources defined in Part 1 of this Standard are feature resources, among which the System resource. Part 2 (this document) defines additional resource types to describe and interact with the dynamic data that flows in and out of these systems.
Part 2 of this Standard defines resource types that allow the provision of dynamic data about all kinds of devices, hardware components or processes that can transmit and/or receive data via communication networks (a.k.a. connected systems), including sensors, platforms, robots, human observers, forecast models, computer simulations, etc.
Flows carrying observation and status data coming out of a system are called Datastreams while flows carrying commands sent to a system are called Control Streams (note that the direction of the flow mentionned here is relative to the real system, which is different from the direction of the data flows going in and out of the API server).
6.2. Design Considerations
TODO
6.3. Resource Types
As indicated above, while part 1 of this Standard focused on defining “static” feature types, part 2 defines additional resources to deal with dynamic data associated to these features.
Figure 1 shows a UML class diagram of all Connected Systems API resources. Resources defined in part 2 are shown with a solid border while resources that were already defined in part 1 are shown with a dashed light gray outline.
Figure 1 — Class diagram of API resources
The table below provides a short summary description of these resource types:
Table 1 — Overview of resource types defined by this Standard
Resource Type | Description | Requirements Class | Possible Encodings |
Datastream | Description of datastreams, including observed properties and features of interest. | Clause 8 | JSON |
Observation | Actual observations, including the result data. | JSON, SWE-JSON, SWE-Text, SWE-Binary | |
Control Stream | Description of control channels, including controllable properties and features of interest. | Clause 9 | JSON |
Command | Actual command messages, including the command parameters data. | JSON, SWE-JSON, SWE-Text, SWE-Binary | |
Command Status | Status info about a given command. | JSON | |
System Event | System events are generated when a system is under maintenance or moved. | Clause 10 | SML-JSON |
Resource Event | Resource events are generated when resources are created, updated or deleted. | Clause 12 | JSON |
NOTE: The encodings listed in the table are the ones defined in this Standard document but extensions can define additional encodings. |
7. Requirements Class “Common”
Unresolved directive in sections/clause_7_requirements_class_common.adoc — include::requirements/common/requirements_class_common.adoc[]
7.1. Overview
All resource types defined in this Standard must comply with a common set of rules, many of which are inherited from OGC API — Common.
7.2. Links
Since resources defined by this Standard can be accessed through multiple collections, any direct link to a resource (referenced by ID) must use its canonical URL.
The canonical URL for a resource is the one that accesses it through the catch-all collection of the corresponding resource type. These collections are rooted at the following URLs:
{api_root}/datastreams
{api_root}/observations
{api_root}/controls
{api_root}/commands
{api_root}/system-events
This leads to the following canonical URL templates for individual resources:
{api_root}/datastreams/{dsId}
{api_root}/observations/{obsId}
{api_root}/controls/{csId}
{api_root}/commands/{cmdId}
{api_root}/system-events/{evtId}
Table 2
Requirement 1 | /req/links/canonical |
---|---|
A | All links to resources corresponding to instances of a resource type defined by this Standard SHALL use the resource’s canonical URL. |
7.3. Resource IDs
Resource IDs are typically generated by the server and are not guaranteed to be globally unique. However, the server must ensure that IDs are unique within a given resource type.
Table 3
Requirement 2 | /req/unique-ids |
---|---|
A | The server SHALL ensure that resource IDs are unique across all collections of a given resource type. |
7.4. Paged Responses
All collections of resource types defined in this Standard support paging.
Table 4
Requirement 3 | /req/unique-ids |
---|---|
A | The server SHALL support paging on all collections containing resource types defined in this Standard using the limit query parameter and the next link, as specified by [OGC-API-COMMON-2] Requirements Module http://www.opengis.net/spec/ogcapi-common-2/1.0/rm/limit. |
8. Requirements Class “Datastreams & Observations”
Unresolved directive in sections/clause_8_requirements_class_datastreams.adoc — include::requirements/datastreams/requirements_class_datastreams.adoc[]
8.1. Overview
This requirements class specifies how DataStream and Observation resource descriptions are provided using this API.
The DataStream resource represents a dataset that is produced by an (observation) system, that is itself represented by a System feature in the API.
A DataStream represents the real-time data stream coming out of the system as well as the historical data accumulated from such stream. It can be used to provide access to real-time data only, archived data only, or both. The time periods that are part of the Datastream resource description are used to disambiguate between these cases.
A DataStream also implements an homogeneous collection of observations as defined in Extensions to the SSN Ontology. Consequently, Observation resources are available through a sub-collection of a DataStream resource.
NOTE: The exact way properties and associations of the resources defined in this section are represented in the payload is defined by each encoding. See section Clause 15.1 for example representations of these resources.
8.2. Datastream Resources
This section defines the properties and associations (links to other resources) that apply to DataStream resources.
Below is the contextual class diagram of the DataStream resource:
Figure 2 — DataStream Resource Diagram
8.2.1. Properties
Table 5
Requirement 4 | /req/datastream/properties |
---|---|
A | A DataStream resource SHALL include all mandatory properties listed in Table 6. |
Table 6 — Datastream Properties
Name | Definition | Data Type | Usage |
---|---|---|---|
name | The human readable name of the datastream. | String | Mandatory |
description | A human readable description for the datastream. | String | Optional |
type | The type of datastream (see Table 8). | Enum | Optional |
validTime | The validity period of the datastream’s description. | TimeExtent | Optional |
phenomenonTime | The time period spanned by the phenomenon times of all observations in this datastream. | TimeExtent | Mandatory |
resultTime | The time period spanned by the result times of all observations in this datastream. | TimeExtent | Mandatory |
observedProperties | Properties for which the observations in this datastream provide measurements. | List<URI> | Mandatory |
formats | The list of formats that the observations in this datastream can be encoded to. | List<String> | Mandatory |
Table 7
Requirement 5 | /req/datastream/type |
---|---|
A | A DataStream resource encoding SHALL use one of the URIs provided in Table 8 as the value of the Type property. If using a URI is not practical, the encoding SHALL define a mapping between all possible values used to encode the type and the URIs defined in this table. |
Table 8 — Datastream Types
Type | Usage |
---|---|
System | For datastreams providing status observations of the parent system itself or one of its subsystems. |
ExternalFOI | For datastreams providing observations of other features of interest. |
8.2.2. Associations
A DataStream resource is also required to include the following associations:
Table 9
Requirement 6 | /req/datastream/links |
---|---|
A | A DataStream resource SHALL include the associations defined in Table 10. |
Table 10 — Datastream Associations
Relation Name | Definition | Target Content |
---|---|---|
system | Link to the System that outputs this datastream. | A single System resource. |
observations | Link to the Observations that are part of this datastream. | A collection of Observation resources. |
samplingFeatures | Link to the Sampling Features that are the subject of observations in this datastream. | A collection of SamplingFeature resources. |
ultimateFeaturesOfInterest | Link to the ultimate features of interest that are the subject of observations in this datastream. | A collection of Feature resources. |
8.3. Datastream Collections
Top level Datastream resource collections are identified with the item-type 'datastream'.
Table 11
Requirement 7 | /req/datastream/collection |
---|---|
A | The server SHALL expose at least one collection containing Datastream resources. |
Table 12
Requirement 8 | /req/datastream/collection-type |
---|---|
A | The server SHALL identify all collections containing DataStream resources by setting the value of the itemType property to 'datastream'. |
Table 13
Requirement 9 | /req/datastream/catchall-collection |
---|---|
A | The server SHALL expose a collection containing all available DataStream resources at URL {api_root}/datastreams. |
Table 14
Requirement 10 | /req/datastream/system-collection |
---|---|
A | The server SHALL expose the collection of all DataStream resources associated to a given System at URL {systemResourceUrl}/datastreams. |
8.4. Observation Schema Resources
Multiple observation formats can be offered for any given datastream. This API provides a way for the server to communicate the schema (not necessarily a JSON schema) corresponding to each observation format.
Note that, even for standard media types such as O&M JSON, a different schema is needed for each individual datastream because the exact content of the observations result property changes according to the properties being observed.
Table 15
Requirement 11 | /req/datastream/schema |
---|---|
A | The server SHALL expose the schemas for a given DataStream at URL {datastreamResourceUrl}/schema. |
B | The server SHALL return a single schema corresponding to the format identified by the mandatory obsFormat query parameter. |
Example — Example
If a datastream reports the following supported observation formats:
application/json
application/swe+csv
application/swe+binary
The schema for each of these formats is obtained with the following requests, respectively:
https://{api_root}/datastreams/{id}/schema?obsFormat=application/json
https://{api_root}/datastreams/{id}/schema?obsFormat=application/swe%2Bcsv
https://{api_root}/datastreams/{id}/schema?obsFormat=application/swe%2Bbinary
Note that the media type in the request has to be properly URL encoded, leading to the %2B in place of the + character.
NOTE 1: The exact content of a schema resource is defined by each encoding. See section Clause 15.1 for example schemas used for observations encoded using the default JSON format.
NOTE 2: A schema must be provided before observations can be inserted in the datastream. The schema is provided either within the datastream resource itself, or separately at a later time on its /schema subresource. Only one schema (for only one format) can be provided by a create operation for a given datastream. However, the server is allowed to automatically convert observations to/from other supported formats, as appropriate. This implies that the server can also automatically generate equivalent schemas for these other formats. Future extensions may define patterns to allow client to define multiple schemas themselves.
NOTE 3: After a datastream has been created and observations have been associated to it, the server may reject certain updates to the schema (e.g. adding or removing result fields, changing UoM, etc.). Datastream schema evolution will be addressed in more details in a future revision, but the current workaround is to create a new datastream if the schema changes.
8.5. Observation Resources
Observation resources are modeled on the corresponding Observation concept defined in the SSN Ontology.
However, since Observation resources exposed through the API are always part of a Datastream (e.g. a type of ObservationCollection), they don’t have to include all mandatory properties as most of them can be factored at the datastream level.
Thus, an Observation resource is not directly associated to a Sensor and a Procedure. Instead, it is the Datastream that the observation is part of, that is attached to a parent System. And it is the System that is, in turn, associated to the Procedure that it implements.
In addition, Observation resources are not restricted to a single observed property. It is thus possible to package the observation result of several properties in a single resource.
Below is the contextual class diagram of the Observation resource:
Figure 3 — Observation Resource Diagram
8.5.1. Properties
Table 16
Requirement 12 | /req/observation/properties |
---|---|
A | An Observation resource SHALL include all mandatory properties listed in Table 17. |
Table 17 — Observation Properties
Name | Definition | Data Type | Usage |
---|---|---|---|
phenomenonTime | The time the measured property value applies to the feature of interest. | DateTime | Mandatory |
resultTime | The time the result value was obtained. | DateTime | Mandatory |
parameters | Observation parameters, providing information about how the procedure was used to produce this specific observation. | Any | Optional |
result | Observation result, carrying the estimated values of the observed properties. | Any | Mandatory |
NOTE: The phenomenonTime can be in the past (e.g. geological or deep space observations) or future (e.g. weather forecast). However, the resultTime can never be in the future. |
8.5.2. Associations
An Observation resource is also required to include the following associations:
Table 18
Requirement 13 | /req/observation/links |
---|---|
A | A Command resource SHALL include the associations defined in Table 19. |
Table 19 — Observation Associations
Relation Name | Definition | Target Content |
---|---|---|
datastream | Link to the DataStream that the observation is part of. | A single DataStream resource. |
featureOfInterest | Link to the feature of interest that is the subject of the observation. | A single SamplingFeature resource. |
8.6. Observation Collections
Top level Observation resource collections are identified with the item-type 'observation'.
Table 20
Requirement 14 | /req/observation/collection |
---|---|
A | The server SHALL expose at least one collection containing Observation resources. |
Table 21
Requirement 15 | /req/observation/collection-type |
---|---|
A | The server SHALL identify all collections containing Observation resources by setting the value of the itemType property to 'observation'. |
Table 22
Requirement 16 | /req/observation/catchall-collection |
---|---|
A | The server SHALL expose a collection containing all available Observation resources at URL {api_root}/observations. |
In addition to top-level collections, each datastream exposes its own observations as a sub-collection of the DataStream resource.
Table 23
Requirement 17 | /req/observation/datastream-collection |
---|---|
A | The server SHALL expose a collection containing all Observation resources available from a given Datastream at URL {datastreamResourceUrl}/observations. |
8.7. Basic Observation Filters
All observation collections support filtering using the query parameters described below.
8.7.1. Phenomenon Time Filter
8.7.2. Result Time Filter
9. Requirements Class “Control Streams & Commands”
Unresolved directive in sections/clause_9_requirements_class_controls.adoc — include::requirements/controls/requirements_class_controls.adoc[]
9.1. Overview
This requirements class specifies how ControlStream, Command, and CommandStatus resource descriptions are provided using this API.
The ControlStream resource represents a control channel that is used to change the value of certain controllable properties of a feature of interest (which can be a System).
A ControlStream represents the real-time stream of command messages sent to the system, as well as all historical commands received through the channel. It can be used to provide access to real-time commands only, archived commands only, or both. The time periods that are part of the ControlStream resource description are used to disambiguate between these cases.
Command resources are available through a sub-collection of a ControlStream resource, and each command can lead to the creation of one or more status reports (i.e. CommandStatus resources).
NOTE: The exact way properties and associations of the resources defined in this section are represented in the payload is defined by each encoding. See section Clause 15.1 for example representations of these resources.
9.2. ControlStream Resources
This section defines the properties and associations (links to other resources) that apply to ControlStream resources.
Below is the contextual class diagram of the ControlStream resource:
Figure 4 — ControlStream Resource Diagram
9.2.1. Properties
Table 24
Requirement 18 | /req/controlstream/properties |
---|---|
A | A ControlStream resource SHALL include all mandatory properties listed in Table 25. |
Table 25 — Control Stream Properties
Name | Definition | Data Type | Usage |
---|---|---|---|
name | The human readable name of the control stream. | String | Mandatory |
description | A human readable description for the control stream. | String | Optional |
type | The type of control stream (see Table 27). | Enum | Optional |
validTime | The validity period of the control stream’s description. | TimeExtent | Optional |
issueTime | The time period spanned by the issue times of all commands in this datastream. | TimeExtent | Mandatory |
executionTime | The time period spanned by the execution times of all commands in this datastream. | TimeExtent | Mandatory |
controlledProperties | Properties whose value can be changed by commands in this control stream. | List<URI> | Mandatory |
formats | The list of formats that the commands in this control stream can be encoded to. | List<String> | Mandatory |
Table 26
Requirement 19 | /req/controlstream/type |
---|---|
A | A ControlStream resource encoding SHALL use one of the URIs provided in Table 27 as the value of the Type property. |
Table 27 — Control Stream Types
Type | Usage |
---|---|
System | For control streams targeting the parent system itself or one of its subsystems. |
ExternalFOI | For control streams targeting external features of interest. |
9.2.2. Associations
A ControlStream resource is also required to include the following associations:
Table 28
Requirement 20 | /req/controlstream/links |
---|---|
A | A ControlStream resource SHALL include the associations defined in Table 29. |
Table 29 — Control Stream Associations
Relation Name | Definition | Target Content |
---|---|---|
system | Link to the System that received commands from this ControlStream. | A single System resource. |
commands | Link to the Commands that were sent to this control channel. | A collection of Command resources. |
samplingFeatures | Link to the Sampling Features that are the target of commands in this control stream. | A collection of SamplingFeature resources. |
ultimateFeaturesOfInterest | Link to the ultimate features of interest that are the target of commands in this control stream. | A collection of Feature resources. |
NOTE: The term sampling feature is used here to identify the proxy feature that is used to describe where the effector interacts with the feature of interest (e.g. the vent of an A/C system, the part of a larger system, etc.). |
9.3. ControlStream Collections
Top level ControlStream resource collections are identified with the item-type 'controlstream'.
Table 30
Requirement 21 | /req/controlstream/collection |
---|---|
A | The server SHALL expose at least one collection containing ControlStream resources. |
Table 31
Requirement 22 | /req/controlstream/collection-type |
---|---|
A | The server SHALL identify all collections containing ControlStream resources by setting the value of the itemType property to 'controlstream'. |
Table 32
Requirement 23 | /req/controlstream/catchall-collection |
---|---|
A | The server SHALL expose a collection containing all available ControlStream resources at URL {api_root}/controls. |
In addition to top-level collections, each system exposes its own control streams as a sub-collection.
Table 33
Requirement 24 | /req/controlstream/system-collection |
---|---|
A | The server SHALL expose the collection of all ControlStream resources associated to a given System at URL {systemResourceUrl}/controls. |
9.4. Command Schema Resources
Multiple command formats can be offered for any given control stream. This API provides a way for the server to communicate the schema (not necessarily a JSON schema) corresponding to each command format.
Note that a different schema is needed for each individual control stream because the exact content of the command parameters property changes according to the properties being controlled.
Table 34
Requirement 25 | /req/controlstream/schema |
---|---|
A | The server SHALL expose the schemas for a given ControlStream at URL {controlStreamResourceUrl}/schema. |
B | The server SHALL return a single schema corresponding to the format identified by the mandatory cmdFormat query parameter. |
Example — Example
If a control stream reports the following supported command formats:
application/json
application/swe+csv
application/swe+binary
The schema for each of these formats is obtained with the following requests, respectively:
https://{api_root}/controls/{id}/schema?cmdFormat=application/json
https://{api_root}/controls/{id}/schema?cmdFormat=application/swe%2Bcsv
https://{api_root}/controls/{id}/schema?cmdFormat=application/swe%2Bbinary
Note that the media type in the request has to be properly URL encoded.
NOTE: The exact content of a schema resource is defined by each encoding. See section Clause 15.1 for example schemas used for commands encoded using the default JSON format.
9.5. Command Resources
Command resources are a generalization of the Actuation concept defined in the SSN Ontology.
Command resources exposed through the API are always part of a CommandStream, thus they don’t have to include all properties of an Actuation as many of them can be factored at the command stream level.
Thus, a Command resource is not directly associated to an Actuator and a Procedure. Instead, it is the CommandStream that the command is part of, that is attached to a parent System. And it is the System that is, in turn, associated to the Procedure that it implements.
In addition, Command resources are not restricted to a single controllable property (actuable property in SSN). It is thus possible to create commands that contain several parameters, and processing a command can result in actions on several properties at once (e.g. both orientation and FOV of a camera can be modified with a single ‘ptz’ command).
Below is the contextual class diagram of the Command resource:
Figure 5 — Command Resource Diagram
9.5.1. Properties
Table 35
Requirement 26 | /req/command/properties |
---|---|
A | A Command resource SHALL include all mandatory properties listed in Table 36. |
Table 36 — Command Properties
Name | Definition | Data Type | Usage |
---|---|---|---|
issueTime | The time the command was received by the system. | DateTime | Mandatory* |
executionTime | The time period during which the command was executed. The time period ends when the effect of the command has modified all controlled properties of the feature of interest. | TimeExtent | Optional |
currentStatus | Current status code of the command (see Table 47). | Enum | Mandatory* |
userId | Identifier of the user who issued the command | String | Optional |
parameters | The value of the command parameters. | Any | Mandatory |
(*) These properties are mandatory when a command is reported by the server but are not required when creating or updating a command. They should be ignored by the server.
Table 37
Requirement 27 | /req/command/status |
---|---|
A | A Command resource encoding SHALL use one of the case-sensitive codes provided in Table 47 as the value of the Status property. |
B | The value of the currentStatus property SHALL be the same as the status code listed in the latest status report. |
9.5.2. Associations
A Command resource is also required to include the following associations:
Table 38
Requirement 28 | /req/command/links |
---|---|
A | A Command resource SHALL include the associations defined in Table 39. |
Table 39 — Command Associations
Relation Name | Definition | Target Content |
---|---|---|
control | Link to the ControlStream that the command is part of. | A single ControlStream resource. |
featureOfInterest | Link to the feature of interest whose properties are changed by this command. | A single SamplingFeature resource. |
status | Link to status reports related to this command. | A collection of CommandStatus resources. |
9.6. Command Collections
Top level Command resource collections are identified with the item-type 'command'.
Table 40
Requirement 29 | /req/command/collection |
---|---|
A | The server SHALL expose at least one collection containing Command resources. |
Table 41
Requirement 30 | /req/command/collection-type |
---|---|
A | The server SHALL identify all collections containing Command resources by setting the value of the itemType property to 'command'. |
Table 42
Requirement 31 | /req/command/catchall-collection |
---|---|
A | The server SHALL expose a collection containing all available Command resources at URL {api_root}/commands. |
In addition to top-level collections, each control stream exposes its own commands as a sub-collection of the ControlStream resource.
Table 43
Requirement 32 | /req/command/controlstream-collection |
---|---|
A | The server SHALL expose a collection containing all Command resources available from a given ControlStream at URL {controlStreamResourceUrl}/commands. |
9.7. Command Status Resources
CommandStatus resources represent a status report describing the state of a command at a given point in time. Several status reports can be issued for any given command.
When commands are processed synchronously, a single status report is provided. But when commands are processed asynchronously, any number of status reports can be provided by the server. They are used to report early acceptance/rejection of the command, scheduling and execution steps as well as failure and cancellations.
Below is the contextual class diagram of the CommandStatus resource:
Figure 6 — Command Status Resource Diagram
9.7.1. Properties
Table 44
Requirement 33 | /req/commandstatus/properties |
---|---|
A | A CommandStatus resource SHALL include all mandatory properties listed in Table 45. |
Table 45 — Command Status Properties
Name | Definition | Data Type | Usage |
---|---|---|---|
reportTime | The time when the status report was generated. | DateTime | Mandatory |
status | Code describing the state of the command (see Table 47). | Enum | Mandatory |
percentCompletion | Estimated progress as a percentage of total progress. | Number | Optional |
executionTime | The time period during which the command was executed. The time period ends when the effect of the command has modified all controlled properties of the feature of interest. | TimeExtent | Optional* |
message | A human readable status message. | String | Optional |
Table 46
Requirement 34 | /req/commandstatus/status |
---|---|
A | A CommandStatus resource encoding SHALL use one of the case-sensitive codes provided in Table 47 as the value of the status property. |
B | The status codes SHALL be used as specified by the ‘Usage’ column of Table 47. Other properties SHALL be set as specified in the table. |
Table 47 — Command Status Codes
Code | Usage |
---|---|
PENDING | The command is pending, meaning it has been received by the system but no decision to accept or reject it has been made. |
ACCEPTED | The command was accepted by the receiving system. This usually means that the command has passed the first validation steps, but it can still be rejected or fail later during execution. |
REJECTED | The command was rejected by the receiving system. It won’t be executed at all and the message property provides the reason for the rejection. This is a final state. No further status updates will be sent. |
SCHEDULED | The command was validated and effectively scheduled by the receiving system. When this status code is used, the scheduled execution time must be provided. |
UPDATED | An update to the command was received and accepted. This code must be used if the system supports task updates. |
CANCELED | The command was canceled by an authorized user. This code must be used if the system supports user driven task cancellations. The REJECTED state should be used instead if the command was canceled by the receiving system. This is a final state. No further status updates will be sent. |
EXECUTING | The command is currently being executed by the receiving system. The status message can provide more information about the current progress. A system can send several status updates with this code but different time stamps to report progress incrementally. In particular, the progress percentage and the end of the (estimated) execution time period can be refined in each update. |
COMPLETED | The command has completed after a successful execution. The actual execution time must be provided. This is a final state. No further status updates will be sent. |
FAILED | The command has failed during execution. The error and/or status message provides the reason for failure. This is a final state. No further status updates will be sent. |
9.7.2. Associations
A CommandStatus resource is also required to include the following associations:
Table 48
Requirement 35 | /req/commandstatus/links |
---|---|
A | A CommandStatus resource SHALL include the associations defined in Table 49. |
Table 49 — Command Status Associations
Relation Name | Definition | Target Content |
---|---|---|
command | Link to the Command that this status report relates to. | A single Command resource. |
10. Requirements Class “System Events”
Unresolved directive in sections/clause_10_requirements_class_system_events.adoc — include::requirements/system/requirements_class_system_events.adoc[]
10.1. Overview
SystemEvent resources are used to capture information about various events and maintenance operations occuring on (observing) systems such as recalibrations, part replacements, software updates, relocations/deployments, operator handoffs, decommissioning, etc.
This section predefines a certain number of event types but the list can be extended further by extensions.
NOTE: The exact way properties and associations of the resources defined in this section are represented in the payload is defined by each encoding. See section Clause 15.1 for example representations of these resources.
10.2. System Event Resources
SystemEvent resources are modeled on the SensorML Event class.
Below is the contextual class diagram of the SystemEvent resource:
Figure 7 — System Event Diagram
10.2.1. Properties
Table 50
Requirement 36 | /req/system-event/properties |
---|---|
A | A SystemEvent resource SHALL include all mandatory properties listed in Table 51. |
Table 51 — System Event Properties
Name | Definition | Data Type | Usage |
---|---|---|---|
name | The name of the event. | String | Mandatory |
description | A human readable description for the event. | String | Optional |
eventTime | The time the event occured on the system. | TimeExtent | Mandatory |
type | The type of event (see Table 53). | URI | Mandatory |
message | A human readable message from the operator. | String | Optional |
Table 52
Requirement 37 | /req/system-event/type |
---|---|
A | A SystemEvent resource encoding SHALL use one of the URIs provided in Table 53 as the value of the Type property. If using a URI is not practical, the encoding SHALL define a mapping between all possible values used to encode the type and the URIs defined in this table. |
Table 53 — System Event Types
10.2.2. Associations
A SystemEvent resource is also required to include the following associations:
Table 54
Requirement 38 | /req/system-event/links |
---|---|
A | A SystemEvent resource SHALL include the associations defined in Table 55. |
Table 55 — System Event Associations
Relation Name | Definition | Target Content |
---|---|---|
system | Link to the System this event relates to. | A single System resource. |
10.3. System Events Collection
System events are made available as a sub-collection of System resources.
Table 56
Requirement 39 | /req/system/events-collection |
---|---|
A | The server SHALL expose System events at URL {systemResourceUrl}/events. |
10.4. Simple Queries
System events can be filtered using simple query parameters defined in OGC API — Common — Part 2.
Table 57
Requirement 40 | /req/filter/event-simplequery |
---|---|
A | The server SHALL support query parameters datetime and limit on all SystemEvent collections. |
Table 58
Requirement 41 | /req/filter/event-time |
---|---|
A | When the datetime query parameter is used to filter a collection of SystemEvent resources, the server SHALL use the eventTime property of the resource to determine its temporal extent. |
B | Only resources with an eventTime that intersects the value of the datetime query parameter SHALL be included in the result set. |
See Clause 13 for more filtering options.
11. Requirements Class “System History”
Unresolved directive in sections/clause_11_requirements_class_system_history.adoc — include::requirements/system/requirements_class_system_history.adoc[]
11.1. Overview
This requirements class specifies how a server can historize System feature descriptions and make the different versions available through the API.
The history mechanism allows the server to retain older versions of a system’s description, valid at different times. This is useful to capture the exact metadata of the system at a given point in time since it can be needed to properly process older observations (e.g. older calibration tables, etc.).
Typically, a new entry would be added to the system history whenever a description with a newer valid time is created. History entries are also often correlated with system events. A new history entry is typically created when a system event results in important changes to the system’s metadata (such as relocation, recalibration, etc. See Clause 10).
When history is supported, the datetime query parameter can be used to retrieve a system’s description at a specific point in time.
11.2. System History Collection
A system’s description history is made available as a sub-collection of System resources.
Table 59
Requirement 42 | /req/system-history/collection |
---|---|
A | The server SHALL expose the history of a System at URL {systemResourceUrl}/history. |
B | A 200-response to a request on the history collection URL shall include the list of all different versions of the System feature description. |
C | All System features in the response SHALL have non-overlapping time periods (as provided by their validTime property). |
11.3. System Temporal Filtering
When system history is supported, the datetime query parameter used to filter system collections is used to determine what version of the system description(s) should be returned by the server.
Table 60
Requirement 43 | /req/filter/system-time |
---|---|
Condition | The request is made on a top-level System collection. |
A | When the datetime parameter is ommitted, the server SHALL include only the latest* description of each systems in the result set. |
C | When the datetime parameter is set to a time instant, the server SHALL include only the system descriptions that were valid at the specified date and time. |
D | When the datetime parameter is set to a time period, the server SHALL include only the newest description of each system among all the ones valid during the specified time period. |
The latest description is the one that is currently valid or, if none is currently valid, the last one valid before the current time.
Table 61
Requirement 44 | /req/filter/system-components-time |
---|---|
Condition | The request is made on the components sub-collection of a System. |
A | When the datetime parameter is ommitted, the server SHALL include only sub-systems that are currently part of the parent system in the result set. The description of each subsystem SHALL be the one that is currently valid. |
C | When the datetime parameter is set to a time instant, the server SHALL include only sub-systems that were part of the parent system at the specified date and time, in the result set. The description of each subsystem SHALL be the one valid at the specified date and time. |
D | When the datetime parameter is set to a time period, the server SHALL include only sub-systems that were part of the parent system at any point during the specified time period. The description of each subsystem SHALL be the newest description valid during the specified time period. |
Table 62
Requirement 45 | /req/filter/system-history-time |
---|---|
Condition | The request is made on the history sub-collection of a System. |
A | When the datetime parameter is ommitted, the server SHALL include all versions of the system description in the result set. |
C | When the datetime parameter is set to a time instant, the server SHALL include only the system description that is valid at the specified date and time (there can be only one). |
D | When the datetime parameter is set to a time period, the server SHALL include all system descriptions with a validTime period that intersects the specified time period. |
12. Requirements Class “Resource Events”
Unresolved directive in sections/clause_12_requirements_class_resource_events.adoc — include::requirements/events/requirements_class_resource_events.adoc[]
12.1. Overview
TODO
13. Requirements Class “Advanced Filtering”
Unresolved directive in sections/clause_13_requirements_class_advanced_filtering.adoc — include::requirements/query/requirements_class_advanced_filtering.adoc[]
13.1. Overview
This requirements class specifies additional filtering options that may be used to select only a subset of the resources in a collection.
All filters defined in this section are implemented using URL query parameters and can be used in addition to the ones defined in other requirements classes.
TODO
14. Requirements Class “Create, Replace, Update and Delete”
Unresolved directive in sections/clause_14_requirements_class_resource_crud.adoc — include::requirements/crud/requirements_class_crud.adoc[]
14.1. Overview
This requirements class specifies how instances of the resource types defined in this Standard are created, replaced, udpated and deleted using the API.
14.2. Batch Mode
TODO
15. Requirements Classes for Encodings
15.1. Requirements Class “JSON Encoding”
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc — include::requirements/encoding/json/requirements_class_json.adoc[]
15.1.1. Overview
This requirements class defines general JSON encodings for all resource types defined in part 2. This encoding must be supported by all implementations.
15.1.2. Media Type
The media type to use to advertise support for this encoding is application/json.
15.1.3. Datastream Encoding Rules
The Datastream resource is encoded as a JSON object. JSON members have the same names as the class properties and associations. Associations are implemented as links.
Table 63
Requirement 46 | /req/encoding/json/datastream-schema |
---|---|
Condition | Server implements Clause 8. |
A | A 200-response with the media type application/json containing Datastream resources SHALL conform to one of the following schemas:
|
Example — A Datastream in JSON format
This is a simple datastream with a single observed property and a single format.
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/datastreams/datastream-simple.json[]
15.1.4. Datastream Schema Encoding Rules
When using the plain application/json media type for retrieving observations, the following schema syntax is used:
15.1.5. Observation Encoding Rules
Table 64
Requirement 47 | /req/encoding/json/observation-schema |
---|---|
Condition | Server implements Clause 8. |
A | A 200-response with the media type application/json containing Observation resources SHALL conform to one of the following schemas:
|
Example — Observations in JSON format
This is a simple observation with a scalar observed property, associated to the datastream of the example above.
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/observations/obs-simple.json[]
This second observation has a vector result type:
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/observations/obs-location.json[]
15.1.6. Control Stream Encoding Rules
The ControlStream resource is encoded as a JSON object. JSON members have the same names as the class properties and associations. Associations are implemented as links.
Table 65
Requirement 48 | /req/encoding/json/controlstream-schema |
---|---|
Condition | Server implements Clause 9. |
A | A 200-response with the media type application/json containing ControlStream resources SHALL conform to one of the following schemas:
|
Example — A Control Stream in JSON format
This is a simple control stream with a single controllable property and a single format.
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/controlStreams/controlStream-ptz.json[]
15.1.7. Command Encoding Rules
Table 66
Requirement 49 | /req/encoding/json/command-schema |
---|---|
Condition | Server implements Clause 9. |
A | A 200-response with the media type application/json containing Command resources SHALL conform to one of the following schemas:
|
Example — Command in JSON format
This is an example command used to task a PTZ camera, encoded in JSON format:
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/commands/command-ptz.json[]
15.1.8. Command Status Encoding Rules
Table 67
Requirement 50 | /req/encoding/json/command-status-schema |
---|---|
Condition | Server implements Clause 9. |
A | A 200-response with the media type application/json containing CommandStatus resources SHALL conform to one of the following schemas:
|
Example — Command status in JSON format
These are example command status reports, encoded in JSON format:
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/commandStatus/command-status-accepted.json[]
Unresolved directive in sections/clause_20_requirements_class_json_encoding.adoc - include::../openapi/examples/commandStatus/command-status-completed.json[]
15.1.9. Resource Event Encoding Rules
15.1.10. System Event Encoding Rules
15.2. Requirements Class “SWE Common JSON Encoding”
Unresolved directive in sections/clause_21_requirements_class_swecommon_json_encoding.adoc — include::requirements/encoding/swecommon/requirements_class_swecommon_json.adoc[]
15.2.1. Overview
This requirements class defines JSON encodings of Observation and Command resources based on [SWECommon-JSON].
15.2.2. Media Type
The media type to use to advertise support for this encoding is application/swe+json.
15.3. Requirements Class “SWE Common Text Encoding”
Unresolved directive in sections/clause_22_requirements_class_swecommon_text_encoding.adoc — include::requirements/encoding/swecommon/requirements_class_swecommon_text.adoc[]
15.3.1. Overview
This requirements class defines JSON encodings of Observation and Command resources based on the Text Encoding defined in the [SWECommon] Standard.
15.3.2. Media Type
The media type to use to advertise support for this encoding is application/swe+csv.
Optionally the media type text/plain can be allowed by a server to retrieve content in this format.
15.4. Requirements Class “SWE Common Binary Encoding”
Unresolved directive in sections/clause_23_requirements_class_swecommon_binary_encoding.adoc — include::requirements/encoding/swecommon/requirements_class_swecommon_binary.adoc[]
15.4.1. Overview
This requirements class defines JSON encodings of Observation and Command resources based on the Binary Encoding defined in the [SWECommon] Standard.
The main objective of this encoding is better data size efficiency than text or JSON, thus allowing for:
transfer of observations and commands over very low power / low bandwidth network links (e.g. LoRa, etc.)
transfer high bandwidth data sets such as raster data (e.g. video, LiDAR, etc.)
For even better efficiency, this encoding can be combined with a transport protocol such as MQTT.
15.4.2. Media Type
The media type to use to advertise support for this encoding is application/swe+binary.
15.4.3. Encoding Rules
TODO: URI for phenomenonTime, resultTime, samplingFeatureID, obs result, obs parameters, etc.
15.4.4. Datastream Schema
When using this encoding, the observation schema provided under the Datastream resource
15.4.5. Control Channel Schema
16. Requirements Classes for Transport Protocols
16.1. Requirements Class “Websocket Transport”
Unresolved directive in sections/clause_30_requirements_class_websocket.adoc — include::requirements/protocol/websocket/requirements_class_websocket.adoc[]
16.1.1. Overview
This requirements class defines how the Websocket protocol can be used to interact with certain resource types.
Websocket can be used for:
Streaming real-time observations from the server to the client
Streaming real-time observations from the client to the server (ingestion)
Streaming real-time commands from the client to the server
Streaming real-time commands from the server to the client (command dispatch)
TODO
16.2. Requirements Class “MQTT Transport”
Unresolved directive in sections/clause_31_requirements_class_mqtt.adoc — include::requirements/protocol/mqtt/requirements_class_mqtt.adoc[]
16.2.1. Overview
This requirements class defines how the MQTT protocol can be used to interact with certain resource types.
MQTT can be used to:
Subscribe to resource events
Subscribe to system events
Subscribe to real-time observations
Publish observations
Subscribe to real-time commands
Publish commands
Use AsyncAPI to define asynchronous operations
TODO
Annex A
(normative)
Conformance Class Abstract Test Suite
Annex B
(informative)
Examples
Annex C
(informative)
Relationship with other OGC/ISO standards (Informative)
C.1. Semantic Sensor Network Ontology
TODO
C.2. Sensor Modeling Language
TODO
C.3. Observations & Measurements
TODO
+ OMS
C.4. Coverages
TODO
C.5. OGC API — Features
TODO
C.6. SensorThings API
TODO
What makes it different from STA
Fully based on OGC API and API Features
Integrated with other OGC APIs via links (Features, MovingFeatures, GeoVolumes, 3D Tiles, Coverages, EDR, STA)
Resource model based on SensorML and O&M ; SOSA/SSN used for semantic tagging
Supports more complex observation and task types
Query model decorrelated from resource encoding
Able to support multiple formats (not only a single JSON model) ⇒ intend to bring in protobuf encoding for SWE Common
C.7. Other OGC APIs
TODO
This API is designed to be used in conjunction with other Web APIs with a particular focus on OGC APIs.
system → link to STA Thing or STA Sensor/Actuator
datastream → link to STA Datastream
control → link to STA TaskingCapability
observation result → link to a Coverages API (large imagery, data cube)
domain feature → link to Features API, GeoVolumes, 3D tiles
system/process → link to Processes API
Annex D
(informative)
Revision History
Date | Release | Editor | Primary clauses modified | Description |
---|---|---|---|---|
2022-12-16 | 1.0 draft | Alex Robin | All | Initial draft version |
2023-04-21 | 1.0 draft | Alex Robin | All | Migration to Metanorma |
Bibliography
TODO
NOTE: The TC has approved Springer LNCS as the official document citation type.
Springer LNCS is widely used in technical and computer science journals and other publications
– Actual References:
[n] Journal: Author Surname, A.: Title. Publication Title. Volume number, Issue number, Pages Used (Year Published)
[n] Web: Author Surname, A.: Title, http://Website-Url
[1] ISO: ISO 19156:2022, Geographic information — Observations, measurements and samples (OMS). ISO (2022).
[2] Topic 20: Observations and Measurements, version 2.0. https://www.ogc.org/standards/om
[3] Sensor Observation Service Interface Standard, Version 2.0. https://www.ogc.org/standards/sos
[4] SensorThings API Part 2: Tasking Core, Version 1.0. http://docs.opengeospatial.org/is/17-079r1/17-079r1.html
[5] SensorThings API Part 1: Sensing, Version 1.1. https://docs.ogc.org/is/18-088/18-088.html
[6] OGC Sensor Planning Service Implementation Standard, Version 2.0. at https://www.ogc.org/standards/sps