Class: RGeo::CoordSys::CS::AngularUnit

Inherits:
Unit show all
Defined in:
lib/rgeo/coord_sys/cs/entities.rb

Overview

OGC spec description

Definition of angular units.

Instance Attribute Summary

Attributes inherited from Unit

#conversion_factor

Attributes inherited from Info

#abbreviation, #alias, #authority, #authority_code, #name, #remarks

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Unit

#_wkt_content, #_wkt_typename, #initialize

Methods inherited from Info

#extension, #initialize

Methods inherited from Base

#_to_wkt, #encode_with, #eql?, #hash, #init_with, #inspect, #marshal_dump, #marshal_load, #to_s, #to_wkt

Constructor Details

This class inherits a constructor from RGeo::CoordSys::CS::Unit

Class Method Details

.create(name_, radians_per_unit_, *optional_) ⇒ Object

Create an AngularUnit given a unit name and a conversion factor in radians per unit. You may also provide the optional parameters specified by the Info interface.


663
664
665
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 663

def create(name_, radians_per_unit_, *optional_)
  new(name_, radians_per_unit_, *optional_)
end

Instance Method Details

#radians_per_unitObject

Returns the number of radians per AngularUnit. Also available as Unit#conversion_factor.


651
652
653
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 651

def radians_per_unit
  @conversion_factor
end