Classes for GML elements and their respective construction functions. See the referenced specification for details.

GmlDirectPosition(pos, srsName = as.character(NA), srsDimension = NA_integer_,
                  axisLabels = as.character(NA), uomLabels = as.character(NA))
GmlDirectPositionLatLon(lat, lon, srsName = as.character(NA),
                        srsDimension = NA_integer_,
                        axisLabels = as.character(NA),
                        uomLabels = as.character(NA))
GmlEnvelope(lowerCorner, upperCorner, srsName = as.character(NA),
            srsDimension = NA_integer_, axisLabels = as.character(NA),
            uomLabels = as.character(NA))
GmlFeatureCollection(featureMembers, id = as.character(NA))
GmlPoint(pos, id = as.character(NA), srsName = as.character(NA),
         srsDimension = NA_integer_, axisLabels = as.character(NA),
         uomLabels = as.character(NA))
GmlPointProperty(href = as.character(NA), point = NULL)
GmlFeatureProperty(href = as.character(NA), feature = NULL)
GmlTimeInstant(timePosition, id = as.character(NA), relatedTimes = list(NA),
               frame = as.character(NA))
GmlTimeInstantProperty(href = as.character(NA), time = NULL)
GmlTimeInterval(interval, unit, radix = NA, factor = NA)
GmlTimePeriod(begin = NULL, beginPosition = NULL, end = NULL,
              endPosition = NULL, duration = as.character(NA),
              timeInterval = NULL, id = as.character(NA),
              relatedTimes = list(NA), frame = as.character(NA))
GmlTimePosition(time, frame = as.character(NA),
                calendarEraName = as.character(NA),
                indeterminatePosition = as.character(NA))
GmlMeasure(value, uom)

Arguments

axisLabels

See corresponding slot description.

begin

See corresponding slot description.

beginPosition

See corresponding slot description.

calendarEraName

See corresponding slot description.

duration

See corresponding slot description.

end

See corresponding slot description.

endPosition

See corresponding slot description.

factor

See corresponding slot description.

feature

See corresponding slot description.

featureMembers

See corresponding slot description.

frame

See corresponding slot description.

href

See corresponding slot description.

id

See corresponding slot description.

indeterminatePosition

See corresponding slot description.

interval

See corresponding slot description.

lat

Latitude coordinate parameter.

lon

Longitue coordinate parameter.

lowerCorner

See corresponding slot description.

point

See corresponding slot description.

pos

See corresponding slot description.

radix

See corresponding slot description.

relatedTimes

See corresponding slot description.

srsDimension

See corresponding slot description.

srsName

See corresponding slot description.

time

See corresponding slot description.

timeInterval

See corresponding slot description.

timePosition

See corresponding slot description.

unit

See corresponding slot description.

uomLabels

See corresponding slot description.

upperCorner

See corresponding slot description.

value

See slot description.

uom

See slot description.

Objects from this classes

Objects can be created by calling the according construction functions. e.g. in the form GmlPoint(...).

Extends

GmlFeature: Class "GmlFeatureOrNULL", directly.

GmlFeatureCollection: Class "GmlFeature", directly. Class "GmlFeatureOrNULL", by class "GmlFeature", distance 2.

GmlLineString: Class "GmlGeometry", directly.

GmlPoint: Class "GmlGeometry", directly.

GmlTimeGeometricPrimitive: Class "GmlTimePrimitive", directly. Class "GmlTimeObject", by class "GmlTimePrimitive", distance 2. Class "GmlTimeObjectOrNULL", by class "GmlTimePrimitive", distance 3.

GmlTimeInstant: Class "GmlTimeGeometricPrimitive", directly. Class "GmlTimeInstantOrNULL", directly. Class "GmlTimePrimitive", by class "GmlTimeGeometricPrimitive", distance 2. Class "GmlTimeObject", by class "GmlTimeGeometricPrimitive", distance 3. Class "GmlTimeObjectOrNULL", by class "GmlTimeGeometricPrimitive", distance 4.

GmlTimeInstantProperty: Class "GmlTimeGeometricPrimitive", directly. Class "GmlTimeInstantPropertyOrNULL", directly. Class "GmlTimePrimitive", by class "GmlTimeGeometricPrimitive", distance 2. Class "GmlTimeObject", by class "GmlTimeGeometricPrimitive", distance 3. Class "GmlTimeObjectOrNULL", by class "GmlTimeGeometricPrimitive", distance 4.

GmlTimeInterval: Class "GmlTimeIntervalOrNULL", directly.

GmlTimeObject: Class "GmlTimeObjectOrNULL", directly.

GmlTimePrimitive: Class "GmlTimeObject", directly. Class "GmlTimeObjectOrNULL", by class "GmlTimeObject", distance 2.

Virtual Classes

No objects may be created from the following virtual classes: GmlFeature, GmlTimeObject, GmlTimePrimitive, GmlTimeGeometricPrimitive, GmlGeometry, all ...OrNULL classes.

Slots

axisLabels:

Object of class "character": An character vector of labels for all the axes of this CRS.

begin:

Object of class "GmlTimeInstantPropertyOrNULL": An object of class GmlTimeInstantProperty-class, the start time of a GmlTimePeriod-class.

beginPosition:

Object of class "GmlTimePositionOrNULL": An object of class GmlTimePosition-class, the start time of a GmlTimePeriod-class.

calendarEraName:

Object of class "character": The name of the calendar era.

duration:

Object of class "character": Duration of an interval using ISO 8601 syntax for temporal length.

end:

Object of class "GmlTimeInstantPropertyOrNULL": An object of class GmlTimeInstantProperty-class, the end time of a GmlTimePeriod-class.

endPosition:

Object of class "GmlTimePositionOrNULL": An object of class GmlTimePosition-class, the end time of a GmlTimePeriod-class.

exterior:

Object of class "ANY" for future use in GmlPolygon.

factor:

Object of class "integer": Factor parameter for a GmlTimeInterval-class. The resolution of the time interval is to one radix ^(-factor) of the specified time unit.

feature:

Object of class "GmlFeatureOrNULL": The directly contained feature in a GmlFeature-class.

featureMembers:

Object of class "list": A list of GmlFeature-class in a GmlFeatureCollection-class.

frame:

Object of class "character": Provides a URI reference that identifies a description of the reference system.

href:

Object of class "character": Reference to a property.

id:

Object of class "character": The identifier/id attribute (gml:id).

indeterminatePosition:

Object of class "character": Inexact temporal positions may be expressed using the optional indeterminatePosition parameter. This takes one of the following values: after, before, now, unknown.

interior:

Object of class "ANY" for future use in GmlPolygon.

interval:

Object of class "character": Interval parameter for a GmlTimeInterval-class.

lowerCorner:

Object of class "GmlDirectPosition": Object of class GmlDirectPosition-class, the lower (left) corner of an GmlEnvelope-class.

point:

Object of class "ANY": An object of class GmlPoint in a GmlPointProperty-class.

points:

Object of class "list" A list of positions for future use in GmlLineString.

posList:

Object of class "ANY": A list of positions for future use in GmlLineString.

pos:

Object of class "character": Character string containing the coordinates in a GmlDirectPosition-class, or a GmlDirectPosition-class in a GmlPoint-class.

poss:

Object of class "list": A list of positions for future use in GmlLineString.

radix:

Object of class "integer": Radix parameter for a GmlTimeInterval-class. The resolution of the time interval is to one radix ^(-factor) of the specified time unit.

relatedTimes:

Object of class "list": List of related times.

srsDimension:

Object of class "integer": Dimensions of the coordinate reference system as stated in the coordinate reference system definition., e.g. 2.

srsName:

Object of class "character": Name of the spatial reference system for bounding box, e.g. "urn:ogc:def:crs:EPSG:4326".

timeInterval:

Object of class "GmlTimeIntervalOrNULL": Time interval element in a GmlTimePeriod-class, an object of class GmlTimeInterval-class.

time:

Object of class "GmlTimeInstantOrNULL": The actual time as an object of class POSIXt in a GmlTimePosition-class, or an object of class GmlTimeInstant-class in a GmlTimeInstantProperty-class.

timePosition:

Object of class "GmlTimePosition": An object of class GmlTimePosition-class in a GmlTimeInstant-class.

unit:

Object of class "character": Unit parameter for a GmlTimeInterval-class.

uomLabels:

Object of class "character": Unit of measurement labels as an ordered character vector for the axes in a bounding box, e.g. "deg".

upperCorner:

Object of class "GmlDirectPosition": Object of class GmlDirectPosition-class, the upper (right) corner of an GmlEnvelope-class.

uom:

Object of class "character": The unit of measurement in a OmMeasure object.

uom:

Object of class "character": The unit of measurement in a GmlMeasure object.

value:

Object of class "numeric": The actual value in a GmlMeasure object.

Methods

encodeXML

signature(obj = "GmlDirectPosition", sos = "SOS") or signature(obj = "GmlEnvelope", sos = "SOS") and more: Convert the given element to an XML respresentaion, and XML “encoding”.

Value

The construction functions return an object of the respective class.

Details

The "...OrNULL" classes are used to model optional slots.

References

GML specification at https://www.opengeospatial.org/standards/gml.

Examples

showClass("GmlDirectPosition")
#> Class "GmlDirectPosition" [package "sos4R"] #> #> Slots: #> #> Name: pos srsName srsDimension axisLabels uomLabels #> Class: character character integer character character #> #> Extends: "GmlDirectPositionOrNULL"
showClass("GmlEnvelope")
#> Class "GmlEnvelope" [package "sos4R"] #> #> Slots: #> #> Name: lowerCorner upperCorner srsName srsDimension #> Class: GmlDirectPosition GmlDirectPosition character integer #> #> Name: axisLabels uomLabels #> Class: character character
showClass("GmlFeature")
#> Virtual Class "GmlFeature" [package "sos4R"] #> #> Slots: #> #> Name: id #> Class: character #> #> Extends: "GmlFeatureOrNULL", "GmlFeatureOrGmlFeaturePropertyOrNULL" #> #> Known Subclasses: "GmlFeatureCollection", "SaSamplingPoint", "SaSamplingSurface", #> "SamsSamplingFeature", "WmlMonitoringPoint"
showClass("GmlFeatureCollection")
#> Class "GmlFeatureCollection" [package "sos4R"] #> #> Slots: #> #> Name: featureMembers id #> Class: list character #> #> Extends: #> Class "GmlFeature", directly #> Class "GmlFeatureOrNULL", by class "GmlFeature", distance 2 #> Class "GmlFeatureOrGmlFeaturePropertyOrNULL", by class "GmlFeature", distance 2
showClass("GmlFeatureOrNULL")
#> Virtual Class "GmlFeatureOrNULL" [package "sos4R"] #> #> No Slots, prototype of class "NULL" #> #> Known Subclasses: #> Class "NULL", directly #> Class "GmlFeature", directly #> Class ".NULL", by class "NULL", distance 2, with explicit coerce
showClass("GmlFeatureProperty")
#> Class "GmlFeatureProperty" [package "sos4R"] #> #> Slots: #> #> Name: href feature #> Class: character GmlFeatureOrNULL #> #> Extends: "GmlFeatureOrGmlFeaturePropertyOrNULL"
showClass("GmlGeometry")
#> Virtual Class "GmlGeometry" [package "sos4R"] #> #> Slots: #> #> Name: id srsName srsDimension axisLabels uomLabels #> Class: character character integer character character #> #> Known Subclasses: "GmlPoint", "GmlLineString", "GmlPolygon", "SamsShape"
showClass("GmlLineString")
#> Class "GmlLineString" [package "sos4R"] #> #> Slots: #> #> Name: poss points posList id srsName #> Class: list list ANY character character #> #> Name: srsDimension axisLabels uomLabels #> Class: integer character character #> #> Extends: "GmlGeometry"
showClass("GmlPoint")
#> Class "GmlPoint" [package "sos4R"] #> #> Slots: #> #> Name: pos id srsName srsDimension #> Class: GmlDirectPosition character character integer #> #> Name: axisLabels uomLabels #> Class: character character #> #> Extends: "GmlGeometry", "GmlPointOrNULL"
showClass("GmlPointProperty")
#> Class "GmlPointProperty" [package "sos4R"] #> #> Slots: #> #> Name: href point #> Class: character GmlPointOrNULL
showClass("GmlPolygon")
#> Class "GmlPolygon" [package "sos4R"] #> #> Slots: #> #> Name: exterior interior id srsName srsDimension #> Class: ANY ANY character character integer #> #> Name: axisLabels uomLabels #> Class: character character #> #> Extends: "GmlGeometry"
showClass("GmlTimeGeometricPrimitive")
#> Virtual Class "GmlTimeGeometricPrimitive" [package "sos4R"] #> #> Slots: #> #> Name: frame relatedTimes id #> Class: character list character #> #> Extends: #> Class "GmlTimePrimitive", directly #> Class "GmlTimeObject", by class "GmlTimePrimitive", distance 2 #> Class "GmlTimeObjectOrNULL", by class "GmlTimePrimitive", distance 3 #> #> Known Subclasses: "GmlTimeInstant", "GmlTimeInstantProperty", "GmlTimePeriod"
showClass("GmlTimeInstant")
#> Class "GmlTimeInstant" [package "sos4R"] #> #> Slots: #> #> Name: timePosition frame relatedTimes id #> Class: GmlTimePosition character list character #> #> Extends: #> Class "GmlTimeGeometricPrimitive", directly #> Class "GmlTimeInstantOrNULL", directly #> Class "GmlTimePrimitive", by class "GmlTimeGeometricPrimitive", distance 2 #> Class "GmlTimeObject", by class "GmlTimeGeometricPrimitive", distance 3 #> Class "GmlTimeObjectOrNULL", by class "GmlTimeGeometricPrimitive", distance 4
showClass("GmlTimeInstantOrNULL")
#> Virtual Class "GmlTimeInstantOrNULL" [package "sos4R"] #> #> No Slots, prototype of class "NULL" #> #> Known Subclasses: #> Class "NULL", directly #> Class "GmlTimeInstant", directly #> Class ".NULL", by class "NULL", distance 2, with explicit coerce
showClass("GmlTimeInstantProperty")
#> Class "GmlTimeInstantProperty" [package "sos4R"] #> #> Slots: #> #> Name: href time frame #> Class: character GmlTimeInstantOrNULL character #> #> Name: relatedTimes id #> Class: list character #> #> Extends: #> Class "GmlTimeGeometricPrimitive", directly #> Class "GmlTimeInstantPropertyOrNULL", directly #> Class "GmlTimePrimitive", by class "GmlTimeGeometricPrimitive", distance 2 #> Class "GmlTimeObject", by class "GmlTimeGeometricPrimitive", distance 3 #> Class "GmlTimeObjectOrNULL", by class "GmlTimeGeometricPrimitive", distance 4
showClass("GmlTimeInstantPropertyOrNULL")
#> Virtual Class "GmlTimeInstantPropertyOrNULL" [package "sos4R"] #> #> No Slots, prototype of class "NULL" #> #> Known Subclasses: #> Class "NULL", directly #> Class "GmlTimeInstantProperty", directly #> Class ".NULL", by class "NULL", distance 2, with explicit coerce
showClass("GmlTimeInterval")
#> Class "GmlTimeInterval" [package "sos4R"] #> #> Slots: #> #> Name: interval unit radix factor #> Class: character character integer integer #> #> Extends: "GmlTimeIntervalOrNULL"
showClass("GmlTimeIntervalOrNULL")
#> Virtual Class "GmlTimeIntervalOrNULL" [package "sos4R"] #> #> No Slots, prototype of class "NULL" #> #> Known Subclasses: #> Class "NULL", directly #> Class "GmlTimeInterval", directly #> Class ".NULL", by class "NULL", distance 2, with explicit coerce
showClass("GmlTimeObject")
#> Virtual Class "GmlTimeObject" [package "sos4R"] #> #> Slots: #> #> Name: id #> Class: character #> #> Extends: "GmlTimeObjectOrNULL" #> #> Known Subclasses: #> Class "GmlTimePrimitive", directly #> Class "GmlTimeGeometricPrimitive", by class "GmlTimePrimitive", distance 2 #> Class "GmlTimeInstant", by class "GmlTimeGeometricPrimitive", distance 3 #> Class "GmlTimeInstantProperty", by class "GmlTimeGeometricPrimitive", distance 3 #> Class "GmlTimePeriod", by class "GmlTimeGeometricPrimitive", distance 3
showClass("GmlTimeObjectOrNULL")
#> Virtual Class "GmlTimeObjectOrNULL" [package "sos4R"] #> #> No Slots, prototype of class "NULL" #> #> Known Subclasses: #> Class "NULL", directly #> Class "GmlTimeObject", directly #> Class ".NULL", by class "NULL", distance 2, with explicit coerce #> Class "GmlTimeGeometricPrimitive", by class "GmlTimePrimitive", distance 3
showClass("GmlTimePeriod")
#> Class "GmlTimePeriod" [package "sos4R"] #> #> Slots: #> #> Name: begin beginPosition #> Class: GmlTimeInstantPropertyOrNULL GmlTimePositionOrNULL #> #> Name: end endPosition #> Class: GmlTimeInstantPropertyOrNULL GmlTimePositionOrNULL #> #> Name: duration timeInterval #> Class: character GmlTimeIntervalOrNULL #> #> Name: frame relatedTimes #> Class: character list #> #> Name: id #> Class: character #> #> Extends: #> Class "GmlTimeGeometricPrimitive", directly #> Class "GmlTimePrimitive", by class "GmlTimeGeometricPrimitive", distance 2 #> Class "GmlTimeObject", by class "GmlTimeGeometricPrimitive", distance 3 #> Class "GmlTimeObjectOrNULL", by class "GmlTimeGeometricPrimitive", distance 4
showClass("GmlTimePosition")
#> Class "GmlTimePosition" [package "sos4R"] #> #> Slots: #> #> Name: time frame calendarEraName #> Class: POSIXt character character #> #> Name: indeterminatePosition #> Class: character #> #> Extends: "GmlTimePositionOrNULL"
showClass("GmlTimePositionOrNULL")
#> Virtual Class "GmlTimePositionOrNULL" [package "sos4R"] #> #> No Slots, prototype of class "NULL" #> #> Known Subclasses: #> Class "NULL", directly #> Class "GmlTimePosition", directly #> Class ".NULL", by class "NULL", distance 2, with explicit coerce
showClass("GmlTimePrimitive")
#> Virtual Class "GmlTimePrimitive" [package "sos4R"] #> #> Slots: #> #> Name: relatedTimes id #> Class: list character #> #> Extends: #> Class "GmlTimeObject", directly #> Class "GmlTimeObjectOrNULL", by class "GmlTimeObject", distance 2 #> #> Known Subclasses: #> Class "GmlTimeGeometricPrimitive", directly #> Class "GmlTimeInstant", by class "GmlTimeGeometricPrimitive", distance 2 #> Class "GmlTimeInstantProperty", by class "GmlTimeGeometricPrimitive", distance 2 #> Class "GmlTimePeriod", by class "GmlTimeGeometricPrimitive", distance 2
# create direct position pos1 <- GmlDirectPosition(pos = "7.0 52.0") show(pos1)
#> Object of class GmlDirectPosition; pos: 7.0 52.0; srsName: NA, srsDimension: NA, srsAxisLabels: NA, uomLabels: NA
# create envelope env1 <- GmlEnvelope(upperCorner = pos1, lowerCorner = GmlDirectPosition("6.0 51.0")) print(env1)
#> Object of class GmlEnvelope; srsName: NA, srsDimension: NA, srsDimension: NA, uomLabels: NA; #> lowerCorner: Object of class GmlDirectPosition; pos: 6.0 51.0; srsName: NA, srsDimension: NA, srsAxisLabels: NA, uomLabels: NA; #> upperCorner: Object of class GmlDirectPosition; pos: 7.0 52.0; srsName: NA, srsDimension: NA, srsAxisLabels: NA, uomLabels: NA
# create envelope with CRS and access it env1 <- GmlEnvelope(upperCorner = pos1, lowerCorner = GmlDirectPosition("6.0 51.0"), srsName = "http://www.opengis.net/def/crs/EPSG/0/4326") sosGetCRS(env1)
#> CRS arguments: +proj=longlat +datum=WGS84 +no_defs
# wrap elements in feature collection GmlFeatureCollection(id = "001", featureMembers=list(pos1, env1))
#> Object of class GmlFeatureCollection; id: 001; #> 2 featureMember(s): new("GmlDirectPosition", pos = "7.0 52.0", srsName = NA, srsDimension = NA, axisLabels = NA, uomLabels = NA), new("GmlEnvelope", lowerCorner = new("GmlDirectPosition", pos = "6.0 51.0", srsName = NA, srsDimension = NA, axisLabels = NA, uomLabels = NA), upperCorner = new("GmlDirectPosition", pos = "7.0 52.0", srsName = NA, srsDimension = NA, axisLabels = NA, uomLabels = NA), srsName = "http://www.opengis.net/def/crs/EPSG/0/4326", srsDimension = NA, axisLabels = NA, uomLabels = NA)
# create point with ID point1 <- GmlPoint(pos = pos1, id = "002") # create point properties GmlPointProperty(href = "http://link.to/point")
#> Object of class GmlPointProperty; href: http://link.to/point; point:
GmlPointProperty(point = point1)
#> Object of class GmlPointProperty; href: NA; point: Object of class GmlPoint; pos: Object of class GmlDirectPosition; pos: 7.0 52.0; srsName: NA, srsDimension: NA, srsAxisLabels: NA, uomLabels: NA; #> srsName: NA, srsDimension: NA, srsDimension: NA, uomLabels: NA
# time interval of one day GmlTimeInterval(interval = "1", unit = "d")
#> Object of class GmlTimeInterval; interval: 1; unit: d; radix: NA; factor: NA
# referenced feature GmlFeatureProperty(href = "http://link.to/feature")
#> Object of class GmlFeatureProperty, href: http://link.to/feature, feature:
# create a time position and wrap it into a time instant timePos1 <- GmlTimePosition(time = as.POSIXct("2010-01-01")) # create direct or referenced time instant timeInst1 <- GmlTimeInstant(timePosition = timePos1) timeInst1
#> GmlTimePosition [ time: 2010-01-01 ]
GmlTimeInstantProperty(href = "http://link.to/timeInstant")
#> An object of class "GmlTimeInstantProperty" #> Slot "href": #> [1] "http://link.to/timeInstant" #> #> Slot "time": #> NULL #> #> Slot "frame": #> character(0) #> #> Slot "relatedTimes": #> list() #> #> Slot "id": #> character(0) #>
# create different variants of time periods # one hour with time positions GmlTimePeriod(beginPosition = timePos1, endPosition = GmlTimePosition(time = timePos1@time+3600))
#> GmlTimePeriod: [ GmlTimePosition [ time: 2010-01-01 ] #> --> GmlTimePosition [ time: 2010-01-01 01:00:00 ] ]
# one week backwards from now timePos <- GmlTimePosition(time = Sys.time()-(3600*24*7)) aWeekAgo <- GmlTimeInstantProperty(time = GmlTimeInstant(time = timePos)) timePos <- GmlTimePosition(time = Sys.time()) now <- GmlTimeInstantProperty(time = GmlTimeInstant(time = timePos)) GmlTimePeriod(begin = aWeekAgo, end = now)
#> GmlTimePeriod: [ Object of class GmlTimeInstantProperty; href: NA; time: GmlTimePosition [ time: 2020-07-01 18:59:14 ] #> --> Object of class GmlTimeInstantProperty; href: NA; time: GmlTimePosition [ time: 2020-07-08 18:59:14 ] ]