GMLTimePeriod

GMLTimePeriod

Format

R6Class object.

Value

Object of R6Class for modelling an GMLTimePeriod

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Public fields

beginPosition

beginPosition [1]: 'POSIXct','POSIXt'

endPosition

endPosition [1]: 'POSIXct','POSIXt'

duration

duration [0..1]: character

Methods

Inherited methods


Method new()

Initializes object

Usage

GMLTimePeriod$new(xml = NULL, beginPosition = NULL, endPosition = NULL)

Arguments

xml

object of class XMLInternalNode-class

beginPosition

object of class numeric, Date or POSIXct-class

endPosition

object of class numeric, Date or POSIXct-class


Method setBeginPosition()

Set begin position

Usage

GMLTimePeriod$setBeginPosition(beginPosition)

Arguments

beginPosition

object of class numeric, Date or POSIXct-class


Method setEndPosition()

Set end position

Usage

GMLTimePeriod$setEndPosition(endPosition)

Arguments

endPosition

object of class numeric, Date or POSIXct-class


Method computeInterval()

Compute interval (ISO defined duration) and set proper attribute for XML encoding. The method calls the static function GMLTimePeriod$computeISODuration

Usage

GMLTimePeriod$computeInterval()


Method setDuration()

Set ISO duration

Usage

GMLTimePeriod$setDuration(
  years = 0,
  months = 0,
  days = 0,
  hours = 0,
  mins = 0,
  secs = 0
)

Arguments

years

years

months

months

days

days

hours

hours

mins

mins

secs

secs


Method clone()

The objects of this class are cloneable with this method.

Usage

GMLTimePeriod$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

  start <- ISOdate(2000, 1, 12, 12, 59, 45)
  end <- ISOdate(2010, 8, 22, 13, 12, 43)
  md <- GMLTimePeriod$new(beginPosition = start, endPosition = end)
  xml <- md$encode()
#> [geometa][INFO] Object 'GMLTimePeriod' is VALID according to ISO 19139 XML schemas!