GetObservation.Rd
getObservation(..)
can be used to retrieve data from a SOS instance by sending a GetObservation request to the given SOS.
getObservationById(..)
can be used to retrieve data from a SOS instance by sending a GetObservationById request to the given SOS.
These methods take a variety of inputs (see slot definitions), of which only offering
is mandatory for GetObservation operation, and the observationId
for GetObservationById operation.
This document also describes classes (and their construction functions) for the operations.
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))
service | The |
---|---|
version | The |
observationId | The value of the |
offering | The |
observedProperty | A list of values for |
responseFormat | The |
srsName | The |
eventTime | A list of objects of class SosEventTime-class which are added as |
procedure | A list of procedure identifiers added to the request as |
featureOfInterest | An object of class SosFeatureOfInterest added to the request as the |
result | An object of class OgcComparisonOps-class added to the request as |
resultModel | The |
responseMode | The |
BBOX | A bounding box to be used only with |
valueReferenceTemporalFilter | The property name used in a temporal filter for SOS 2.0 KVP requests, ignore for SOS 1.0.0. |
signature(sos = "SOS", offering = "SosObservationOffering")
or signature(sos = "SOS", offering = "character")
Request observation data from the given SOS for the given offering (either character identifier or an object of class SosObservationOffering
).
signature(sos = "SOS", observationId = "character")
Request observation data from the given SOS for the given observation identifier.
Objects can be created by calls to the construction functions of the form SosGetObservationById(...)
or SosGetObservationById(...)
.
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
:For SOS 1.0.0: object of class "character"
for SOS 2.0.0 a list, specifies the offering 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, out-of-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 requests.
version
:Object of class "character"
, specification version for operation.
SosGetObservation:
Class "OwsServiceOperation"
, directly.
SosGetObservationById:
Class "OwsServiceOperation"
, directly.
Please consult the specification for details on possible contents of the request.
Constructor functions: An object of class SosGetObservation-class or SosGetObservationById-class respectively.
Request functions: A list of or an object of class OmObservationCollection-class or OmObservation-class depending on the returned content.
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.
SosGetObservation-class
, SosGetObservationById-class
if (FALSE) { # request observations mySOSpox <- SOS(url = "http://sensorweb.demo.52north.org/sensorwebtestbed/service/pox", binding = "POX", useDCPs = FALSE) myOffering <- sosOfferings(mySOS)[["ws2500"]] period <- sosCreateTimePeriod(sos = mySOS, begin = as.POSIXct("2015/11/01"), end = as.POSIXct("2015/11/02")) eventTime <- sosCreateEventTimeList(period) nov2015 <- getObservation(sos = mySOSpox, offering = myOffering, eventTime = eventTime) # request observation by identifier and get the data obsId <- getObservationById(sos = mySOSpox, observationId = "http://www.52north.org/test/observation/1") sosResult(obsId, coordinates = TRUE) } 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="om/1.0.0"" 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="om/1.0.0" , 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="om/1.0.0" , responseMode(s): NA , srsName: NA , resultModel(s): NA