Base class of a connection to a Sensor Observation Service.

SOS(url,
    binding = SosDefaultBinding(),
    version = sos100_version,
    parsers = SosParsingFunctions(),
    encoders = SosEncodingFunctions(),
    dataFieldConverters = SosDataFieldConvertingFunctions(),
    timeFormat = sosDefaultTimeFormat, verboseOutput = FALSE,
    switchCoordinates = FALSE,
    useDCPs = TRUE,
    dcpFilter = SosDefaultDCPs(),
    additionalKVPs = list(),
    namespaces = SosAllNamespaces(version = version),
    ...)

SOS_Test(name = "test",
         binding = SosDefaultBinding(),
         version = sos100_version,
         parsers = SosParsingFunctions(),
         encoders = SosEncodingFunctions(),
         dataFieldConverters = SosDataFieldConvertingFunctions(),
         timeFormat = sosDefaultTimeFormat,
         verboseOutput = FALSE,
         switchCoordinates = FALSE,
         useDCPs = TRUE,
         dcpFilter = SosDefaultDCPs(),
         additionalKVPs = list(),
         namespaces = SosAllNamespaces(version = version),
         ...)

Arguments

url

See the corresponding slot description.

binding

See the corresponding slot description.

version

See the corresponding slot description.

parsers

See the corresponding slot description.

encoders

See the corresponding slot description.

dataFieldConverters

See the corresponding slot description.

timeFormat

See the corresponding slot description.

verboseOutput

See the corresponding slot description.

switchCoordinates

See the corresponding slot description.

useDCPs

See the corresponding slot description.

dcpFilter

See the corresponding slot description.

additionalKVPs

See the corresponding slot description.

name

Name of the test SOS class.

namespaces

Namespace definitions to be used for parsing and encoding or responses and requests, passed to ns argument of xml2 functions.

...

Additional parameters that are passed on to the getObservation call that is done within this function.

Objects from the Class

Objects can be created by calls to the construction function of the form SOS(...).

Object from the class can be used in calls to function for metadata retrieval of sensors (link{describeSensor-methods}) and observation data queries (link{getObservation-methods} and link{getObservationById-methods})

Slots

url:

Object of class "character": The endpoint of the service, e.g. http://myUrl.org/SOS1/sos.

binding:

Object of class "character": The binding, or transport protocol, see SosSupportedBindings for available ones.

version:

Object of class "character": The connected service's version, e.g. "1.0.0".

capabilities:

Object of class "OwsCapabilities" ~~

parsers:

Object of class "list": A list of named functions for parsing of SOS responses.

encoders:

Object of class "list": A list of named functions for encoding of SOS requests.

dataFieldConverters:

Object of class "list": A list of named functions to be used by the parsing methods to convert data values to the correct R type, see SosDataFieldConvertingFunctions for the default functions and how to add your own converters.

timeFormat:

Object of class "character": The time format to be used or decoding and encoding time character strings to and from POSIXt classes.

verboseOutput:

Object of class "logical": Trigger parameter for extensive debugging information on the console.

switchCoordinates:

Object of class "logical": Trigger enabling switching of lat/long during parsing stage.

useDCPs:

Object of class "logical": Trigger for not using DCP endpoints from the capabilities but just the URL defined when creating the SOS connection. If there is a specific endpoint for a specific binding the user must make sure the configured binding and DCP match.

dcpFilter:

Object of class "list": Named list of regular expressions to be applied (using grep) to DCPs if there is more than one for the chosen binding.

addtionalKVPs:

A nam of class "list": Named list of key-value-pairs to be appended to an KVP request.

Methods

sosAbstract

signature(obj = "SOS"): ...

sosBinding

signature(sos = "SOS"): The protocol used for a connection to the service.

sosCapabilitiesDocumentOriginal

signature(sos = "SOS"): To retrieve the full original service metadata document.

sosCaps

signature(sos = "SOS"): ...

sosContents

signature(sos = "SOS"): ...

sosDataFieldConverters

signature(sos = "SOS"): ...

sosTime

signature(obj = "SOS"): ...

sosTime

signature(obj = "SOS"): ...

sosTitle

signature(obj = "SOS"): ...

sosOperations

signature(sos = "..."): ...

sosGetCRS

signature(obj = "character"): ...

sosGetDCP

signature(sos = "SOS", operation = "character", type = "character"): Get the distributed computing platform URL for the given operation and method type. If type is missing, the function returns all available DCPs.

sosEncoders

signature(sos = "SOS"): ...

sosFeatureIds

signature(obj = "list"): ...

sosFeaturesOfInterest

signature(obj = "list"): ...

sosGetCRS

signature(obj = "character"): Get an object of class sp:::CRS for a given OGC URN depicting a reference system, like urn:ogc:def:crs:EPSG:1000.

sosName

signature(obj = "..."): ...

sosObservedProperties

signature(sos = "SOS"): ...

sosOffering

signature(sos = "SOS", offeringId = "character"): ...

sosOfferingIds

signature(sos = "SOS"): ...

sosOfferings

signature(sos = "SOS"): ...

sosOperation

signature(sos = "SOS", operationName = "character"): ...

sosOperationsMetadata

signature(sos = "SOS"): ...

sosParsers

signature(sos = "SOS"): ...

sosProcedures

signature(sos = "SOS"): Accessor function for the procedures of a SOS (via list in capabilities of GetObservation operation) or a SosObservationOffering.

sosResponseFormats

signature(sos = "SOS"): TBD: add missing signatures ...

sosResponseMode

signature(sos = "SOS"): ...

sosResultModels

signature(sos = "SOS"): ...

sosServiceIdentification

signature(sos = "SOS"): ...

sosServiceProvider

signature(sos = "SOS"): ...

sosSrsName

signature(sos = "SOS"): ...

sosSwitchCoordinates

signature(sos = "SOS"): ...

sosTimeFormat

signature(sos = "SOS"): ...

sosUrl

signature(sos = "SOS"): ...

sosVersion

signature(sos = "SOS"): ...

sosTime

signature(obj = "SOS"): Accessor function for the event time period from the GetObservation operations metadata.

sosFilter_Capabilities

signature(sos = "SOS"): Accessor function for the filter capabilities of a SOS object.

describeSensor

signature(sos = "SOS_2.0.0", procedure = "character"): ...

getCapabilities

signature(sos = "SOS_2.0.0"): ...

getDataAvailability

signature(sos = "SOS_2.0.0"): ...

getFeatureOfInterest

signature(sos = "SOS_2.0.0", featureOfInterest = "ANY"): ...

getFeatureOfInterest

signature(sos = "SOS_2.0.0", featureOfInterest = "character"): ...

getObservationById

signature(sos = "SOS_2.0.0", observationId = "character"): ...

getObservation

signature(sos = "SOS_2.0.0", offering = "character"): ...

getObservation

signature(sos = "SOS_2.0.0", offering = "SosObservationOffering_2.0.0"): ...

sosBinding

signature(sos = "SOS_2.0.0"): ...

sosRequest

signature(sos = "SOS_2.0.0", request = "OwsServiceOperation", verbose = "logical", inspect = "logical"): ...

sosUrl

signature(sos = "SOS_2.0.0"): access the endpoint of the SOS object.

Value

The construction functions returns an object of class SOS-class.

Details

From the introduction of the specification document: “The goal of SOS is to provide access to observations from sensors and sensor systems in a standard way that is consistent for all sensor systems including remote, in-situ, fixed and mobile sensors.”

References

Na, A., Priest, M. (Eds.), Sensor Observation Service, Open Geospatial Consortium Inc., OGC 06-009r6, Version: 1.0

The document is available for download at https://www.opengeospatial.org/standards/sos.

See also

See also creation function SOS and the package vignette for general description of use.

Examples

showClass("SOS")
#> Virtual Class "SOS" [package "sos4R"] #> #> Slots: #> #> Name: version capabilities parsers #> Class: character OwsCapabilities list #> #> Name: encoders dataFieldConverters timeFormat #> Class: list list character #> #> Name: verboseOutput switchCoordinates useDCPs #> Class: logical logical logical #> #> Name: dcpFilter additionalKVPs namespaces #> Class: list list character #> #> Known Subclasses: "SOS_Test", "SOS_1.0.0", "SOS_2.0.0"
showClass("SOS_2.0.0")
#> Class "SOS_2.0.0" [package "sos4R"] #> #> Slots: #> #> Name: url binding version #> Class: character character character #> #> Name: capabilities parsers encoders #> Class: OwsCapabilities list list #> #> Name: dataFieldConverters timeFormat verboseOutput #> Class: list character logical #> #> Name: switchCoordinates useDCPs dcpFilter #> Class: logical logical list #> #> Name: additionalKVPs namespaces #> Class: list character #> #> Extends: "SOS", "SOS_versioned"
if (FALSE) { # create a SOS connection mySOS <- SOS(url = "http://sensorweb.demo.52north.org/sensorwebtestbed/service/kvp", binding = "KVP") # create the URL to a GET request for GetCapabilities sosCapabilitiesUrl(mySOS) # access details of the SOS connection and it's metadata sosContents(mySOS) sosTime(mySOS) sosFeaturesOfInterest(mySOS) sosBinding(mySOS) } if (FALSE) { # create a SOS connetion with a specific connection method and time format mysos <- SOS(url = "http://mysos.org/sos", binding = "KVP", timeFormat = "%Y-%m-%d") # turn on verbose output for all methods and functions SOS(url = "http://mysos.org/sos", verboseOutput = TRUE) # get the meaning of an exception code sosExceptionCodeMeaning(ex@exceptionCode) # create a CRS object from a URN CRS string sosGetCRS("urn:ogc:def:crs:EPSG:4217") # create a SOS for a specific binding at a specific endpoint SOS(url = "http://localhost:8080/52n-sos/sos/pox", binding = "POX", useDCPs = FALSE) # create a SOS using only the DCPs from the capabilities that match a specific # pattern with the default binding SOS(url = "http://localhost:8080/52n-sos/sos/service", dcpFilter = list("POX" = "/pox")) }