Classes (and their construction functions) to request observations from a Sensor Observation Service.

SosGetObservation(service, version, offering, observedProperty, responseFormat,
                  srsName = as.character(NA), eventTime = list(),
                  procedure = as.character(NA), featureOfInterest = NULL,
                  result = NULL, resultModel = as.character(NA),
                  responseMode = as.character(NA), BBOX = as.character(NA),
                  valueReferenceTemporalFilter = as.character(NA))
SosGetObservationById(service, version, observationId, responseFormat,
                      srsName = as.character(NA), resultModel = as.character(NA),
                      responseMode = as.character(NA))

Arguments

service

The service attribute of the request, e.g. SOS.

version

The version attribute of the request, e.g. 1.0.0.

observationId

The value of the ObservationId element in the request, e.g. o_12345, which is to be optained. This could have been obtained by the client via a URL in a feed, alert, or some other notification.

offering

The offering element value in the request, e.g. "temperatures". All other parameters are depending on the selected offering.

observedProperty

A list of values for observedProperty elements in the request, e.g. "urn:property:AirTemperature". IDs of phenomena are advertised in capabilities document.

responseFormat

The responseFormat element value in the request, e.g. text/xml;subtype="om/1.0.0". ID of the output format to be used for the requested data. The supported output formats are listed in the selected offering capabilities.

srsName

The srsName attribute of the request, e.g. urn:ogc:def:crs:EPSG:4326.

eventTime

A list of objects of class SosEventTime-class which are added as eventTime elements to the request. Allows a client to request observations from a specific instant, multiple instances or periods of time in the past, present and future. The supported range is listed in the selected offering capabilities.

procedure

A list of procedure identifiers added to the request as procedure elements.

featureOfInterest

An object of class SosFeatureOfInterest added to the request as the featureOfInterest element, or NULL. Specifies target feature for which observations are requested.

result

An object of class OgcComparisonOps-class added to the request as result element, or NULL, or any element that can be encoded using encodeXML(...) and then be added to an XML document with addChildren(...). Filtering: Only report observations where the result matches this expression.

resultModel

The resultModel element of the request, e.g. om:Measurement, which is an identifier of the result model to be used for the requested data. The resultModel values supported by a service are listed in the contents section of the service metadata, identified as QName values.

responseMode

The responseMode element of the request, e.g. inline, which allows the client to request the form of the response.

BBOX

A bounding box to be used only with KVP encoding in request via HTTP GET, in the format minlon,minlat,maxlon,maxlat,srsURI?, with the spatial reference system being optional. This element is ignored for POST requests, use the parameter featureOfInterest instead, see SosBindings.

valueReferenceTemporalFilter

The property name used in a temporal filter for SOS 2.0 KVP reuests, ignore for SOS 1.0.0.

Objects from the Class

Objects can be created by calls to the construction functions of the form SosGetObservationById(...) or SosGetObservationById(...).

Slots

BBOX:

Object of class "character", specifies a bounding box for spatial filtering to be applied in GET requests (only), see SosBindings

eventTime:

Object of class "list", specifies the time period(s) for which observations are requested.

featureOfInterest:

Object of class "SosFeatureOfInterestOrNULL", specifies the feature for which observations are requested. This can either be represented by a reference to a feature ID advertised in the capabilities document or can be a spatial constraint

observationId:

Object of class "character", the Id of the requested observation.

observedProperty:

Object of class "list", specifies the phenomenon or phenomena for which observations are requested.

offering:

Object of class "character", specifies the offering URI advertised in the GetCapabilities document.

procedure:

Object of class "list", procedure parameter specifies the sensor system(s) for which observations are requested.

request:

Object of class "character", the name of the request.

responseFormat:

Object of class "character", specifies the desired resultFormat MIME content type for transport of the results.

responseMode:

Object of class "character", specifies whether results are requested in-line, outof-band, as an attachment, or if this is a request for an observation template that will be used for subsequent calls to GetResult.

resultModel:

Object of class "character", specifies the QName of the root element of an O&M Observation or element in the appropriate substitution group.

result:

Object of class "ANY", provides a place to put in OGC filter expressions based on property values. This instructs the SOS to only return observations where the result matches this expression.

service:

Object of class "character", service type identifier.

srsName:

Object of class "character", defines the spatial reference system that should be used for any geometries that are returned in the response. This must be one of the advertised values in the offering specified in gml:srsName elements.

valueReferenceTemporalFilter:

Object of class "character", the property name used in a temporal filter for SOS 2.0 KVP reuests.

version:

Object of class "character", specification version for operation.

Extends

SosGetObservation: Class "OwsServiceOperation", directly.

SosGetObservationById: Class "OwsServiceOperation", directly.

Methods

checkRequest

signature(service = "SOS", operation = "SosGetObservationById", verbose = "logical") or signature(service = "SOS", operation = "GetObservation", verbose = "logical"): Check the request for validity and for compliance with the metadata available in from the given SOS.

encodeRequestKVP

signature(obj = "SosGetObservationById") or signature(obj = "GetObservation"): Transform the information to key-value pair format, see encodeKVP.

encodeRequestXML

signature(obj = "SosGetObservationById") or signature(obj = "GetObservation"): Transform the information to XML format, see encodeXML.

encodeRequestSOAP

signature(obj = "SosGetObservation"): Transform the information to XML format for SOAP requests.

Details

Please consult the specification for details on possible contents of the request.

Value

An object of class SosGetObservation-class or SosGetObservationById-class respectively.

References

See OGC 06-009r6 section 8.4, or the XSD schema file at http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd.

See OGC 06-009r6 section 10.1, or the XSD schema file at http://schemas.opengis.net/sos/1.0.0/sosGetObservationById.xsd.

See also

SosGetObservation-class, SosGetObservationById-class

Examples

showClass("SosGetObservation")
#> Class "SosGetObservation" [package "sos4R"] #> #> Slots: #> #> Name: offering observedProperty #> Class: character list #> #> Name: responseFormat srsName #> Class: character character #> #> Name: eventTime procedure #> Class: list character #> #> Name: featureOfInterest result #> Class: SosFeatureOfInterestOrNULL OgcComparisonOpsOrXMLOrNULL #> #> Name: resultModel responseMode #> Class: character character #> #> Name: BBOX valueReferenceTemporalFilter #> Class: character character #> #> Name: service request #> Class: character character #> #> Name: version #> Class: character #> #> Extends: "OwsServiceOperation"
showClass("SosGetObservationById")
#> Class "SosGetObservationById" [package "sos4R"] #> #> Slots: #> #> Name: observationId responseFormat srsName resultModel #> Class: character character character character #> #> Name: responseMode service request version #> Class: character character character character #> #> Extends: "OwsServiceOperation"
responseFormat <- "text/xml;subtype=&quot;om/1.0.0&quot;" obsReq <- SosGetObservation(service = "SOS", version = "1.0.0", offering = "temperatures", observedProperty = list("urn:property:AirTemperature"), responseFormat = responseFormat) print(obsReq)
#> Object of class SosGetObservation: service: SOS , version: 1.0.0 , offering: temperatures #> observered property: urn:property:AirTemperature #> responseFormat(s): text/xml;subtype=&quot;om/1.0.0&quot; , responseMode(s): NA #> procedure(s) NA #> feature(s) of interest #> event time: #> result: NULL #> srsName: NA #> resultModel(s): NA #> temporal value reference: NA #>
obsByIdReq <- SosGetObservationById(service = "SOS", version = "1.0.0", observationId = "o_12345", responseFormat = responseFormat) print(obsByIdReq)
#> Object of class SosGetObservationById: service: SOS , version: 1.0.0 #> Obsvervation ID: o_12345 #> ResponseFormat(s): text/xml;subtype=&quot;om/1.0.0&quot; , responseMode(s): NA , srsName: NA , resultModel(s): NA
# NOT RUN { sos <- SOS("http://mysos.net/sos") encodeXML(obsByIdReq, sos = sos) # }