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

Definition at line 533 of file lwgeom_spheroid.c.

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

534 {
535  SPHEROID s;
536 
537  /* Init to WGS84 */
538  spheroid_init(&s, 6378137.0, 6356752.314245179498);
539  s.a = s.b = s.radius;
540 
541  PG_RETURN_DATUM(DirectFunctionCall4(geometry_distance_spheroid,
542  PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PointerGetDatum(&s), BoolGetDatum(FALSE)));
543 }
void spheroid_init(SPHEROID *s, double a, double b)
Initialize a spheroid object for use in geodetic functions.
Definition: lwspheroid.c:20
double b
Definition: liblwgeom.h:270
double radius
Definition: liblwgeom.h:274
char * s
Definition: cu_in_wkt.c:24
double a
Definition: liblwgeom.h:269
#define FALSE
Definition: dbfopen.c:169
Datum geometry_distance_spheroid(PG_FUNCTION_ARGS)

Here is the call graph for this function: