Class: RGeo::CoordSys::CS::LinearUnit
- Defined in:
- lib/rgeo/coord_sys/cs/entities.rb
Overview
OGC spec description
Definition of linear units.
Instance Attribute Summary
Attributes inherited from Unit
Attributes inherited from Info
#abbreviation, #alias, #authority, #authority_code, #name, #remarks
Class Method Summary collapse
-
.create(name_, meters_per_unit_, *optional_) ⇒ Object
Create a LinearUnit given a unit name and a conversion factor in meters per unit.
Instance Method Summary collapse
-
#meters_per_unit ⇒ Object
Returns the number of meters per LinearUnit.
Methods inherited from Unit
#_wkt_content, #_wkt_typename, #initialize
Methods inherited from Info
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_, meters_per_unit_, *optional_) ⇒ Object
Create a LinearUnit given a unit name and a conversion factor in meters per unit. You may also provide the optional parameters specified by the Info interface.
529 530 531 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 529 def create(name_, meters_per_unit_, *optional_) new(name_, meters_per_unit_, *optional_) end |
Instance Method Details
#meters_per_unit ⇒ Object
Returns the number of meters per LinearUnit. Also available as Unit#conversion_factor.
520 521 522 |
# File 'lib/rgeo/coord_sys/cs/entities.rb', line 520 def meters_per_unit @conversion_factor end |