Class Proj4::Unit
In: ext/projrb.c
lib/proj4.rb
Parent: Proj4::Def

The Unit class holds information about the units (‘m’, ‘km’, ‘mi’, …) known to Proj.4.

Methods

id   inspect   list   name   to_meter  

Public Class methods

Return list of all units we know about.

[Source]

/**Return list of all units we know about.

   call-seq: list -> Array of Proj4::Unit

 */
static VALUE unit_list(VALUE self){

Public Instance methods

Get ID of the unit.

[Source]

/**Get ID of the unit.

   call-seq: id -> String

 */
static VALUE unit_get_id(VALUE self){

Returns unit definition as string in format ’#<Proj4::Unit id="…", to_meter="…", name="…">’.

[Source]

     # File lib/proj4.rb, line 459
459:         def inspect
460:             "#<Proj4::Unit id=\"#{id}\", to_meter=\"#{to_meter}\", name=\"#{name}\">"
461:         end

Get name (description) of the unit.

[Source]

/**Get name (description) of the unit.

   call-seq: name -> String

 */
static VALUE unit_get_name(VALUE self){

Get conversion factor of this unit to a meter. Note that this is a string, it can either contain a floating point number or it can be in the form numerator/denominator.

[Source]

/**Get conversion factor of this unit to a meter. Note that this is a string, it can either contain a floating point number or it can be in the form numerator/denominator.

   call-seq: to_meter -> String

 */
static VALUE unit_get_to_meter(VALUE self){

[Validate]