sosConvert: SOS Conversion functions for Observation Results

Description Usage Arguments Details Value Author(s) See Also Examples

Description

These functions are called by the parsers of om:Observation and om:Measurement documents to convert the actual values to the correct classes.

Usage

1
2
3
4

Arguments

x

The object to be converted.

sos

An object of class SOS, whose settings, like formating information, can be utilized.

Details

The methods are automatically called from the given SOS's list of conversion functions. This is either default or can be set manually on creation.

If you want to provide you own conversion functions, follow the example below. Always include the common parameters x and sos.

There are functions to access the converters of a SOS (sosDataFieldConverters-methods) and to combine default and your own converters (SosDataFieldConvertingFunctions).

Value

An object of the respective class converted from the parameter x.

Author(s)

Daniel Nuest daniel.nuest@uni-muenster.de

See Also

sosDataFieldConverters-methods, SosDataFieldConvertingFunctions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
sos <- SOS_Test()
one <- sosConvertDouble("1", sos)
class(one)

# add conversion rules, also possible to override default ones
myConverters <- SosDataFieldConvertingFunctions(
	"C" = sosConvertDouble,
	"S/m" = sosConvertDouble)
sos <- SOS(url = SosExampleServices()[[2]], dataFieldConverters = myConverters)

# show converters
sosDataFieldConverters(sos)

## End(Not run)

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