PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ spheroid_init()

void spheroid_init ( SPHEROID s,
double  a,
double  b 
)

Initialize a spheroid object for use in geodetic functions.

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:314
double radius
Definition: liblwgeom.h:318
double f
Definition: liblwgeom.h:315
double e_sq
Definition: liblwgeom.h:317
double a
Definition: liblwgeom.h:313
Here is the caller graph for this function: