This method sends a GetObservation request to the given SOS.

Methods

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.

Details

It takes a variety of inputs, of which only the offering is mandatory for GetObservation request, and the observationId for GetObservationByIdRequests.

Examples

# NOT RUN {
# 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)
# }