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

#initialize, #wkt_typename

Methods inherited from Info

#extension, #initialize

Methods inherited from Base

#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.


557
558
559
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 557

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.


548
549
550
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 548

def radians_per_unit
  @conversion_factor
end