PostGIS  2.2.7dev-r@@SVN_REVISION@@
Datum LWGEOM_distance_sphere ( PG_FUNCTION_ARGS  )

Definition at line 528 of file lwgeom_spheroid.c.

References SPHEROID::a, SPHEROID::b, FALSE, geometry_distance_spheroid(), SPHEROID::radius, s, and spheroid_init().

529 {
530  SPHEROID s;
531 
532  /* Init to WGS84 */
533  spheroid_init(&s, 6378137.0, 6356752.314245179498);
534  s.a = s.b = s.radius;
535 
536  PG_RETURN_DATUM(DirectFunctionCall4(geometry_distance_spheroid,
537  PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PointerGetDatum(&s), BoolGetDatum(FALSE)));
538 }
void spheroid_init(SPHEROID *s, double a, double b)
Initialize a spheroid object for use in geodetic functions.
Definition: lwspheroid.c:25
double b
Definition: liblwgeom.h:298
double radius
Definition: liblwgeom.h:302
char * s
Definition: cu_in_wkt.c:23
double a
Definition: liblwgeom.h:297
#define FALSE
Definition: dbfopen.c:168
Datum geometry_distance_spheroid(PG_FUNCTION_ARGS)

Here is the call graph for this function: