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

Description Details Note Author(s) References See Also Examples

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.

Details

Package: sos4R
Type: Package
Version: 0.4.2
Date: 2020-07-08
License: GPL-2
LazyLoad: yes
ByteCompile: yes
Imports: xml2, httr, sp, uuid, methods, stats, utils, graphics

Note

The development of this software was gratefully supported by the 52North Student Innovation Prize for Geoinformatics 2010.

To stay updated on all matters around sos4R go to the development blog at http://www.nordholmen.net/sos4r/.

If you want to ask questions about using the software, please go to the to the issue tracker at https://github.com/52North/sos4R/issues.

The most extensive documentation is contained in the package vignettes.

Author(s)

Daniel Nuest <daniel.nuest@uni-muenster.de>

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
## Not run: 

# Open the connection
sos = SOS(url = "<the service endpoint>")

# 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)
utils::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, binding = "KVP", dataFieldConverters = myConverters)
sosDataFieldConverters(mySos)

# where to find the cheat sheet
sosCheatSheet()

# global objects caching objects during parsing of XML documents
cacheVariables

## End(Not run)

sos4R documentation built on July 9, 2020, 5:07 p.m.