Class: Proj4::Ellipsoid
Class Method Summary collapse
-
.list ⇒ Object
Return list of all reference ellipsoids we know about.
Instance Method Summary collapse
-
#ell ⇒ Object
Get elliptical parameter of the reference ellipsoid.
-
#id ⇒ Object
Get ID of the reference ellipsoid.
-
#inspect ⇒ Object
Returns ellipsoid definition as string in format ‘#<Proj4::Ellipsoid id=“…”, major=“…”, ell=“…”, name=“…”>’.
-
#major ⇒ Object
Get equatorial radius (semi-major axis, a value) of the reference ellipsoid.
-
#name ⇒ Object
Get name of the reference ellipsoid.
Methods inherited from Def
#<=>, #==, get, #initialize, #to_s
Constructor Details
This class inherits a constructor from Proj4::Def
Class Method Details
.list ⇒ Object
Return list of all reference ellipsoids we know about.
call-seq: list -> Array of Proj4::Ellipsoid
313 314 315 316 317 318 319 320 |
# File 'ext/projrb.c', line 313
static VALUE ellipsoid_list(VALUE self){
struct PJ_ELLPS *el;
VALUE list = rb_ary_new();
for (el = pj_get_ellps_ref(); el->id; el++){
rb_ary_push(list, Data_Wrap_Struct(cEllipsoid, 0, 0, el));
}
return list;
}
|
Instance Method Details
#ell ⇒ Object
Get elliptical parameter of the reference ellipsoid. This is either the polar radius (semi-minor axis, b value) or the inverse flattening (1/f, rf).
call-seq: ell -> String
346 347 348 349 350 |
# File 'ext/projrb.c', line 346
static VALUE ellipsoid_get_ell(VALUE self){
struct PJ_ELLPS *el;
Data_Get_Struct(self,struct PJ_ELLPS,el);
return rb_str_new2(el->ell);
}
|
#id ⇒ Object
Get ID of the reference ellipsoid.
call-seq: id -> String
326 327 328 329 330 |
# File 'ext/projrb.c', line 326
static VALUE ellipsoid_get_id(VALUE self){
struct PJ_ELLPS *el;
Data_Get_Struct(self,struct PJ_ELLPS,el);
return rb_str_new2(el->id);
}
|
#inspect ⇒ Object
Returns ellipsoid definition as string in format ‘#<Proj4::Ellipsoid id=“…”, major=“…”, ell=“…”, name=“…”>’.
call-seq: inspect -> String
422 423 424 |
# File 'lib/proj4.rb', line 422 def inspect "#<Proj4::Ellipsoid id=\"#{id}\", major=\"#{major}\", ell=\"#{ell}\", name=\"#{name}\">" end |
#major ⇒ Object
Get equatorial radius (semi-major axis, a value) of the reference ellipsoid.
call-seq: major -> String
336 337 338 339 340 |
# File 'ext/projrb.c', line 336
static VALUE ellipsoid_get_major(VALUE self){
struct PJ_ELLPS *el;
Data_Get_Struct(self,struct PJ_ELLPS,el);
return rb_str_new2(el->major);
}
|
#name ⇒ Object
Get name of the reference ellipsoid.
call-seq: name -> String
356 357 358 359 360 |
# File 'ext/projrb.c', line 356
static VALUE ellipsoid_get_name(VALUE self){
struct PJ_ELLPS *el;
Data_Get_Struct(self,struct PJ_ELLPS,el);
return rb_str_new2(el->name);
}
|