Class: When::TM::CoordinateSystem

Inherits:
ReferenceSystem show all
Defined in:
lib/when_exe/tmreference.rb

Overview

時間座標系

see gml schema

Constant Summary

Constants included from Parts::Resource

Parts::Resource::LabelProperty

Instance Attribute Summary collapse

Attributes inherited from ReferenceSystem

#domain_of_validity, #position

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#_pool, #child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods inherited from ReferenceSystem

#domain, #name

Methods included from Parts::Resource

#[], #^, _decode, _encode, _extract_prefix, _instance, _parse, _path_with_prefix, _replace_tags, _setup_, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?

Methods included from Parts::Resource::Pool

#[], #[]=, #_pool, #_setup_, #pool_keys

Methods included from Parts::Resource::Synchronize

#synchronize

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class When::Parts::Resource

Instance Attribute Details

#intervalWhen::TM::Duration (readonly)

この参照系の軸で時間の参照単位とする間隔

Standard unit of time used to measure duration on the axis of the coordinate system



789
790
791
# File 'lib/when_exe/tmreference.rb', line 789

def interval
  @interval
end

#originWhen::BasicTypes::DateTime (readonly)

グレゴリオ暦の日付及びその日のUTCの時刻で表現する、座標参照系の尺度の原点位置

Position of the origin of the scale on which the temporal coordinate system is based expressed as a date in the Gregorian calendar and time of day in UTC



780
781
782
# File 'lib/when_exe/tmreference.rb', line 780

def origin
  @origin
end

Instance Method Details

#transform_coord(c_value) ⇒ When::TM::DateAndTime Also known as: transformCoord

この時間参照系の座標値をグレゴリオ暦及びUTC時刻に変換する



797
798
799
# File 'lib/when_exe/tmreference.rb', line 797

def transform_coord(c_value)
  When.Resource('_c:Gregorian').jul_trans(JulianDate.universal_time(c_value.universal_time, {:frame=>When.utc}))
end

#transform_date_time(date_time) ⇒ When::TM::Coordinate Also known as: transformDateTime

グレゴリオ暦及びUTC時刻をこの時間参照系の座標値に変換する



808
809
810
# File 'lib/when_exe/tmreference.rb', line 808

def transform_date_time(date_time)
  Coordinate.universal_time(date_time.universal_time, {:frame=>self})
end