Learn R Programming

sos4R (version 0.1-10)

sosCreate: Convenience Functions for Request Parameter Creations

Description

These methods can be seen as convenience functions or shortcuts to regularly used parameters in GetObservation requests to a Sensor Observation Service. The remove some complexity and target the most common cases, but also limit flexibility.

Usage

sosCreateBBOX(lowLat, lowLon, uppLat, uppLon, srsName, srsDimension = NA_integer_, axisLabels = NA_character_, uomLabels = NA_character_, propertyName = sosDefaultSpatialOpPropertyName)
sosCreateBBoxMatrix(lowLat, lowLon, uppLat, uppLon)
sosCreateFeatureOfInterest(objectIDs = list(NA), spatialOps = NULL, bbox = NULL, srsName = NA_character_)
sosCreateEventTime(time, operator)
sosCreateEventTimeList(time, operator)
sosCreateTimeInstant(sos, time, frame = as.character(NA), calendarEraName = as.character(NA), indeterminatePosition = as.character(NA))
sosCreateTimePeriod(sos, begin, end, frame = as.character(NA), calendarEraName = as.character(NA), indeterminatePosition = as.character(NA), duration = as.character(NA), timeInterval = NULL)

Arguments

lowLat
Minimum latitude for bounding box and boundinb box matrix.
lowLon
Minimum longitude for bounding box and boundinb box matrix.
uppLat
Maximum latitude for bounding box and boundinb box matrix.
uppLon
Maximum longitude for bounding box and boundinb box matrix.
srsName
Name of the spatial reference system for bounding box, e.g. "urn:ogc:def:crs:EPSG:4326".
srsDimension
Dimensions of the spatial reference system, e.g. 2.
axisLabels
Labels of the axes of a bounding box as an ordered character vector.
uomLabels
Unit of measurement labels as an ordered character vector for the axes in a bounding box, e.g. "deg".
propertyName
The spatial property name for the bounding box, e.g. "urn:ogc:data:location"
objectIDs
Identifiers of a feature of interest list.
spatialOps
An object of class OgcSpatialOps-class which is inserted into the feature of interest element.
bbox
Shortcut to add a feature of interest with a GmlEnvelope-class, object must be a matrix as created by sosCreateBBoxMatrix(...).
time
Object of class "GmlTimeGeometricPrimitive" for sosCreateEventTimeList, or an object of class POSIXt for sosCreateTimePeriod.
operator
The operator to be used for the time in sosCreateEventTimeList, e.g. "TM_During".
sos
An object of class SOS-class for which the element is created. The SOS might for example be required for formatting settings.
frame
Provides a URI reference that identifies a description of the reference system.
calendarEraName
The name of the calendar era.
begin
Object of class POSIXt.
end
Object of class POSIXt.
indeterminatePosition
Inexact temporal positions may be expressed using the optional indeterminatePosition parameter. This takes one of the following values: after, before, now, unknown.
duration
Duration of an interval using ISO 8601 syntax for temporal length.
timeInterval
An object of class "GmlTimeIntervalOrNULL" to be used in a GmlTimePeriod-class.

Value

  • An object of the respective class, or a list in case of sosEventTimeList.

See Also

These methods create object of the following classes: GmlTimeInstant-class, GmlTimePeriod-class, SosEventTime-class, SosFeatureOfInterest-class, OgcBBOX-class, matrix-class.

Examples

Run this code
# create a feature of interest based on identifiers
foiIDs <- list("urn:ogc:object:feature:1", "urn:ogc:object:feature:2")
foiObj <- sosCreateFeatureOfInterest(objectIDs = foiIDs[1:2])
print(foiObj)

# create a bounding box matrix and use it to create a spatial feature of interest
bboxMatrix <- sosCreateBBoxMatrix(lowLat = 50.0, lowLon = 7.0, uppLat = 53.0, uppLon = 10.0)
foiBBox <- sosCreateFeatureOfInterest(bbox = bboxMatrix, srsName = "urn:ogc:def:crs:EPSG:6.8:4326")
print(foiBBox)

# create a foi with a bounding box
bbox <- sosCreateBBOX(lowLat = 50.0, lowLon = 7.0, uppLat = 53.0, uppLon = 10.0, srsName = "urn:ogc:def:crs:EPSG:6.8:4326", srsDimension = as.integer(2), axisLabels = "lat,lon", uomLabels = "deg,deg", propertyName = "bboxName")
foiBBox2 <- sosCreateFeatureOfInterest(spatialOps = bbox)
print(foiBBox2)

# time examples TBD

Run the code above in your browser using DataLab