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, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?, root_dir

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

Returns:



776
777
778
# File 'lib/when_exe/tmreference.rb', line 776

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



767
768
769
# File 'lib/when_exe/tmreference.rb', line 767

def origin
  @origin
end

Instance Method Details

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

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

Parameters:

Returns:



784
785
786
# File 'lib/when_exe/tmreference.rb', line 784

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時刻をこの時間参照系の座標値に変換する

Parameters:

Returns:



795
796
797
# File 'lib/when_exe/tmreference.rb', line 795

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