50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


sos4R (version 0.2-11)

sos4R-package: A client for the OGC Sensor Observation Service

Description

sos4R is a client for Sensor Observation Services (SOS). It allows users to retrieve metadata from SOS web service instances as specified by the Open Geospatial Consortium (OGC) and subsequently to interactively create requests for observation data based on the available sensors, phenomena, observations, offerings etc.

Arguments

Details

Package:
sos4R
Type:
Package
Version:
0.2-11
Date:
2013-05-14
License:
GPL-2
LazyLoad:
yes
ByteCompile:
yes
Depends:
XML, RCurl, sp

References

Na, A., Priest, M. (Eds.), 2007. Sensor Observation Service. OpenGIS Implementation Standard, Version 1.0, OGC 06-009r6

See Also

See also the package vignette, vignette(sos4R).

Examples

Run this code

## Not run: 
# 
# # Take a SOS from the example list
# sos.url = SosExampleServices()[[1]]
# 
# # Open the connection
# sos = SOS(url = SOS)
# 
# # List offerings, procedures and observedProperties
# names(sosOfferings(sos))
# sosProcedures(sos)
# sosObservedProperties(sos)
# 
# # Create time period (last 30 days)
# tPeriod <- sosCreateEventTimeList(
# 	time = sosCreateTimePeriod(
# 		sos = pegelsos,
# 		begin = Sys.time() - (3600 * 24 * 30),
# 		end = Sys.time()))
# 
# # Request data for all observed properties and procedures of a certain offering
# observation <- getObservation(sos = sos,
# 		observedProperty = sosObservedProperties(sos),
# 		offering = sosOfferings(sos)[[2]],
# 		procedure = sosProcedures(sos),
# 		eventTime = tPeriod)
# 
# # Inspect result
# sosResult(observation)
# str(sosResult(observation))
# 
# # Inspect attributes of the data fields
# if(is.list(sosResult(observation))) {
# 	attributes(sosResult(observation)[,1])
# }
# else {
# 	attributes(sosResult(pegelObs)[,1])
# }
# 
# # Use custom converting function and connection method. This mechanism works 
# # the same for encoders and decoders.
# myConverters <- SosDataFieldConvertingFunctions(
# 	"myNumericUnit" = sosConvertDouble)
# mySos <- SOS(sos.url, method = "GET", dataFieldConverters = myConverters)
# sosDataFieldConverters(mySos)
# 
# # get the cheat sheet
# sosCheatSheet()
# 
# # view the NEWS file
# sosNews()
# # DEPRECATED: the changes document
# #sosChanges()
# 
# ## End(Not run)

Run the code above in your browser using DataLab