Learn R Programming

sos4R (version 0.1-10)

SosEventTime-class: Classes and Construction Functions for sos:eventTime elements.

Description

Temporal query parameters for GetObservation requests.

Usage

SosEventTime(temporalOps)
SosEventTimeLatest()

Arguments

temporalOps
An object of class OgcBinaryTemporalOp-class to be wrapped by the sos:eventTime element.

Objects from the Classes

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

Details

Specifies the time period(s) for which observations are requested. This 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. The objects of these classes are used in the GetObservation (paramter in GetObservation).

The request for the latest observation is not standard conform. The distinction between the classes happens eventually during encoding, where both classes have different encoding functions.

A typical example in a POST request: om:samplingTime 2006-11-05T17:18:58.000-06:00 2006-11-05T21:18:59.000-06:00

In GET binding (SosBindings) the eventTime is simply omitted for getting the latest observation.

It is recommended to use the creation functions as shown in the examples.

References

See SOS specification, Table 4: Parameters of GetObservation Request.

See Also

See also SosGetObservation-class, sosCreateEventTimeList-methods.

Examples

Run this code
showClass("SosEventTime")
showClass("SosEventTimeLatest")

# create SosEventTime for all times after the given time stamp
tOps <- TM_After(time = GmlTimeInstant(timePosition = GmlTimePosition(as.POSIXct("2010-01-01 12:00"))))
time1 <- SosEventTime(tOps)

# encode it as XML and KVP
encodeXML(time1)
encodeKVP(time1)

time2 <- SosEventTimeLatest()
encodeXML(time2)

Run the code above in your browser using DataLab