PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ LWGEOM_distance_sphere()

Datum LWGEOM_distance_sphere ( PG_FUNCTION_ARGS  )

Definition at line 541 of file lwgeom_spheroid.c.

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

Referenced by LWGEOM_distance_ellipsoid().

542 {
543  SPHEROID s;
544 
545  /* Init to WGS84 */
546  spheroid_init(&s, 6378137.0, 6356752.314245179498);
547  s.a = s.b = s.radius;
548 
549  PG_RETURN_DATUM(DirectFunctionCall4(geometry_distance_spheroid,
550  PG_GETARG_DATUM(0), PG_GETARG_DATUM(1), PointerGetDatum(&s), BoolGetDatum(FALSE)));
551 }
void spheroid_init(SPHEROID *s, double a, double b)
Initialize a spheroid object for use in geodetic functions.
Definition: lwspheroid.c:39
double b
Definition: liblwgeom.h:313
double radius
Definition: liblwgeom.h:317
char * s
Definition: cu_in_wkt.c:23
double a
Definition: liblwgeom.h:312
#define FALSE
Definition: dbfopen.c:168
Datum geometry_distance_spheroid(PG_FUNCTION_ARGS)
Here is the call graph for this function:
Here is the caller graph for this function: