PostGIS  2.5.0dev-r@@SVN_REVISION@@
void spheroid_init ( SPHEROID s,
double  a,
double  b 
)

Initialize spheroid object based on major and minor axis.

Initialize a spheroid object for use in geodetic functions.

Definition at line 39 of file lwspheroid.c.

References SPHEROID::a, SPHEROID::b, SPHEROID::e_sq, SPHEROID::f, and SPHEROID::radius.

Referenced by geometry_distance_spheroid(), LWGEOM_distance_sphere(), test_gbox_utils(), test_lwgeom_area_sphere(), test_lwgeom_distance_sphere(), test_spheroid_area(), test_spheroid_distance(), test_tree_circ_distance(), and test_tree_circ_distance_threshold().

40 {
41  s->a = a;
42  s->b = b;
43  s->f = (a - b) / a;
44  s->e_sq = (a*a - b*b)/(a*a);
45  s->radius = (2.0 * a + b ) / 3.0;
46 }
double b
Definition: liblwgeom.h:313
double radius
Definition: liblwgeom.h:317
double f
Definition: liblwgeom.h:314
double e_sq
Definition: liblwgeom.h:316
double a
Definition: liblwgeom.h:312

Here is the caller graph for this function: