| 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.
Get ID of the unit.
/**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="…">’.
# File lib/proj4.rb, line 459
459: def inspect
460: "#<Proj4::Unit id=\"#{id}\", to_meter=\"#{to_meter}\", name=\"#{name}\">"
461: end
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.
/**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){