Description Usage Arguments Details Value Author(s) See Also Examples
These functions are called by the parsers of om:Observation and om:Measurement documents to convert the actual values to the correct classes.
1 2 3 4 | sosConvertString(x, sos)
sosConvertDouble(x, sos)
sosConvertTime(x, sos)
sosConvertLogical(x, sos)
|
x |
The object to be converted. |
sos |
An object of class |
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
).
An object of the respective class converted from the parameter x
.
Daniel Nuest daniel.nuest@uni-muenster.de
sosDataFieldConverters-methods
, SosDataFieldConvertingFunctions
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.