PostGIS  2.1.10dev-r@@SVN_REVISION@@
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 20 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(), and test_tree_circ_distance().

21 {
22  s->a = a;
23  s->b = b;
24  s->f = (a - b) / a;
25  s->e_sq = (a*a - b*b)/(a*a);
26  s->radius = (2.0 * a + b ) / 3.0;
27 }
double b
Definition: liblwgeom.h:270
double radius
Definition: liblwgeom.h:274
double f
Definition: liblwgeom.h:271
double e_sq
Definition: liblwgeom.h:273
double a
Definition: liblwgeom.h:269

Here is the caller graph for this function: